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

Documentation Index

Fetch the complete documentation index at: https://wb-21fd5541-weave-caching.mintlify.app/llms.txt

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

wrapOpenAI

wrapOpenAI<T>(openai): T OpenAI API をラップし、OpenAI 呼び出しの関数トレーシングを有効にします。

型パラメータ

名前
TOpenAIAPI を継承

パラメータ

名前
openaiT

戻り値

T Example
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:469