-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[WIP] Add new tool call streaming system #1713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
zanllan23-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
| import type { infer as zodInfer, ZodType } from 'zod'; | ||
| import * as z from 'zod'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: these should use v4 imports https://zod.dev/library-authors#how-to-support-zod-3-and-zod-4-simultaneously
| chatkit: ChatKitAPI.ChatKit = new ChatKitAPI.ChatKit(this._client); | ||
| assistants: AssistantsAPI.Assistants = new AssistantsAPI.Assistants(this._client); | ||
| threads: ThreadsAPI.Threads = new ThreadsAPI.Threads(this._client); | ||
| chat: ChatAPI.Chat = new ChatAPI.Chat(this._client); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should define a sibling chat.ts file in this directory and define a new class there instead of adding toolRunner() to the existing resource class, as now it'll be accessible from client.chat.completions.toolRunner() which isn't what we want yet
update types start setting up tests get non streaming working begin work on modifying anthropic tests to openai update models
Changes being requested
Update the tool call pattern to use a new async iterable style pattern that makes more easily accessible tool calls as they are fired, and API responses.
Additional context & links