-
Notifications
You must be signed in to change notification settings - Fork 173
brianyin/ajs-320-bump-openai-to-6.x #813
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: main
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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@livekit/agents-plugin-google': patch | ||
| '@livekit/agents-plugin-openai': patch | ||
| '@livekit/agents-plugins-test': patch | ||
| '@livekit/agents': patch | ||
| --- | ||
|
|
||
| bump openai to 6.x |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,5 +10,6 @@ describe('OpenAI', async () => { | |
| new LLM({ | ||
| temperature: 0, | ||
| }), | ||
| false, | ||
| ); | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| // SPDX-License-Identifier: Apache-2.0 | ||
| import { initializeLogger, llm as llmlib } from '@livekit/agents'; | ||
| import { describe, expect, it } from 'vitest'; | ||
| import { z } from 'zod'; | ||
| import { z } from 'zod/v4'; | ||
|
|
||
| const toolCtx: llmlib.ToolContext = { | ||
| getWeather: llmlib.tool({ | ||
|
|
@@ -58,8 +58,9 @@ const toolCtx: llmlib.ToolContext = { | |
| }), | ||
| }; | ||
|
|
||
| export const llm = async (llm: llmlib.LLM) => { | ||
| export const llm = async (llm: llmlib.LLM, isGoogle: boolean) => { | ||
| initializeLogger({ pretty: false }); | ||
|
|
||
| describe('LLM', async () => { | ||
| it('should properly respond to chat', async () => { | ||
| const chatCtx = new llmlib.ChatContext(); | ||
|
|
@@ -120,7 +121,7 @@ export const llm = async (llm: llmlib.LLM) => { | |
| expect(calls.length).toStrictEqual(1); | ||
| expect(JSON.parse(calls[0]!.args).unit).toStrictEqual('celsius'); | ||
| }); | ||
| it('should handle optional arguments', async () => { | ||
| it.skipIf(isGoogle)('should handle optional arguments', async () => { | ||
| const calls = await requestFncCall( | ||
| llm, | ||
| 'Use a tool call to update the user info to name Theo. Leave email and address blank.', | ||
|
|
@@ -129,8 +130,8 @@ export const llm = async (llm: llmlib.LLM) => { | |
|
|
||
| expect(calls.length).toStrictEqual(1); | ||
| expect(JSON.parse(calls[0]!.args).name).toStrictEqual('Theo'); | ||
|
Comment on lines
131
to
132
Contributor
Author
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. google is still outputting NULL for 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. I found this issue with |
||
| expect(JSON.parse(calls[0]!.args).email).toBeNull(); | ||
| expect(JSON.parse(calls[0]!.args).address).toBeNull(); | ||
| expect(JSON.parse(calls[0]!.args).email).toBeUndefined(); | ||
| expect(JSON.parse(calls[0]!.args).address).toBeUndefined(); | ||
| }); | ||
| }); | ||
| }); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
For example:
When hover over
WebSearchOptionsin Cursor, it shows:instead of
This helps debug