SimpleFunctions
ADAPTER·GitHub·Other

OpenAI Agents Prediction Market Adapter

Function-calling tools for OpenAI Agents and Chat Completions

Install

npm i openai-agents-prediction-markets

JSON-schema function-calling tools you can drop into any OpenAI agent. The tools resolve to SimpleFunctions API calls under the hood.

Works with both the official openai library and the OpenAI Agents SDK. Tool descriptions are tuned for tool-capable OpenAI models to know when to use what.

Quickstart

import { makeTools } from 'openai-agents-prediction-markets'
import OpenAI from 'openai'

const tools = makeTools({ apiKey: process.env.SF_API_KEY })
const openai = new OpenAI()
const res = await openai.chat.completions.create({
  model: 'gpt-4o',
  messages,
  tools,
})

Tags

openaiadapteragenttypescripttoolfunction-calling

Related