Wraps an OpenAI SDK object with Langfuse tracing. Function calls are extended with a tracer that logs detailed information about the call, including the method name,
input parameters, and output.
Example
constclient = newOpenAI(); constres = observeOpenAI(client, { traceName:"My.OpenAI.Chat.Trace" }).chat.completions.create({ messages: [{ role:"system", content:"Say this is a test!" }], model:"gpt-3.5-turbo", user:"langfuse", max_tokens:300 });
Wraps an OpenAI SDK object with Langfuse tracing. Function calls are extended with a tracer that logs detailed information about the call, including the method name, input parameters, and output.
Example