メインコンテンツへスキップ

Documentation Index

Fetch the complete documentation index at: https://wb-21fd5541-john-wbdocs-2044-rename-serverless-products.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

wrapOpenAI

wrapOpenAI<T>(openai): T OpenAI の call で関数トレースを有効にするために、OpenAI API をラップします。

型パラメーター

タイプ
Textends OpenAIAPI

パラメーター

タイプ
openaiT

戻り値

T
const openai = wrapOpenAI(new OpenAI());
const result = await openai.chat.completions.create({
  model: 'gpt-3.5-turbo',
  messages: [{ role: 'user', content: 'Hello, world!' }]
});

定義場所

integrations/openai.ts:505