-
Notifications
You must be signed in to change notification settings - Fork 1k
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
v5 chore: fully remove deprecated function call types from the tool runner #1431
base: alpha-next
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,12 +130,12 @@ class RunnerListener { | |
readonly contents: string[] = []; | ||
readonly messages: ChatCompletionMessageParam[] = []; | ||
readonly chatCompletions: OpenAI.Chat.ChatCompletion[] = []; | ||
readonly functionCalls: OpenAI.Chat.ChatCompletionMessage.FunctionCall[] = []; | ||
readonly functionCalls: OpenAI.Chat.ChatCompletionMessageToolCall.Function[] = []; | ||
readonly functionCallResults: string[] = []; | ||
finalContent: string | null = null; | ||
finalMessage: ChatCompletionMessageParam | undefined; | ||
finalChatCompletion: OpenAI.Chat.ChatCompletion | undefined; | ||
finalFunctionCall: OpenAI.Chat.ChatCompletionMessage.FunctionCall | undefined; | ||
finalFunctionCall: OpenAI.Chat.ChatCompletionMessageToolCall.Function | undefined; | ||
finalFunctionCallResult: string | undefined; | ||
totalUsage: OpenAI.CompletionUsage | undefined; | ||
error: OpenAIError | undefined; | ||
|
@@ -247,13 +247,13 @@ class StreamingRunnerListener { | |
readonly eventContents: [string, string][] = []; | ||
readonly eventMessages: ChatCompletionMessageParam[] = []; | ||
readonly eventChatCompletions: OpenAI.Chat.ChatCompletion[] = []; | ||
readonly eventFunctionCalls: OpenAI.Chat.ChatCompletionMessage.FunctionCall[] = []; | ||
readonly eventFunctionCalls: OpenAI.Chat.ChatCompletionMessageToolCall.Function[] = []; | ||
readonly eventFunctionCallResults: string[] = []; | ||
|
||
finalContent: string | null = null; | ||
finalMessage: ChatCompletionMessageParam | undefined; | ||
finalChatCompletion: OpenAI.Chat.ChatCompletion | undefined; | ||
finalFunctionCall: OpenAI.Chat.ChatCompletionMessage.FunctionCall | undefined; | ||
finalFunctionCall: OpenAI.Chat.ChatCompletionMessageToolCall.Function | undefined; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm maybe we should also rename these to tool calls? cc @kwhinnery-openai do you have any thoughts here? |
||
finalFunctionCallResult: string | undefined; | ||
error: OpenAIError | undefined; | ||
gotConnect = false; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,7 +134,7 @@ describe('instantiate azure client', () => { | |
|
||
const spy = jest.spyOn(client, 'request'); | ||
|
||
await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError(APIUserAbortError); | ||
await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrow(APIUserAbortError); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: why change this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was also flagged as deprecated and azure is custom code. We should update codegen with this change too. |
||
expect(spy).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
|
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.
aside: can / should we update eslint to automatically add these type annotations?