Confirm this is a feature request for the Node library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
I currently have a pattern where I need to pass context to my tools to allow them to act on my app. For example:
function updateEvent(context: { eventId: string}, args: ArgsFromOpenAi) {
const event = await fetchEvent(eventId);
}
It'd be great if there were some way to pass a global context to the runner since the runner is passed into each function call. Then, I could do something like this:
function updateEvent( args: ArgsFromOpenAi, runner: ChatCompletionStreamingRunner<EventContext>) {
const { eventId } = runner.context;
const event = await fetchEvent(eventId);
}
Additional context
A workaround is to build my own runner that leverages the existing helpers. However, this is complicated because of the types integration.
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
I currently have a pattern where I need to pass context to my tools to allow them to act on my app. For example:
It'd be great if there were some way to pass a global context to the runner since the runner is passed into each function call. Then, I could do something like this:
Additional context
A workaround is to build my own runner that leverages the existing helpers. However, this is complicated because of the types integration.