-
Notifications
You must be signed in to change notification settings - Fork 3.1k
chore(azure) add built-in tools tests for azure provider Responses API #9431
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
Conversation
memo: how to make fixtures files
- xxxxx/fixtures/xxxxxxxxxxxxxx.n.chunks.txt
const result = streamText({ model: azure.responses('gpt-5-mini'), // use your own deployment prompt: 'Create a program that generates five random numbers between 1 and 100 with two decimal places, and show me the execution results.', tools: { code_interpreter: azure.tools.codeInterpreter(), }, includeRawChunks:true, }); for await (const part of result.fullStream) { if(part.type==="raw"){ console.log(JSON.stringify(part.rawValue)); } } }
- xxxxx/fixtures/xxxxxxxxxxxxxx.n.json
const basicResult = await generateText({ model: azure.responses('gpt-5-mini'), prompt: 'Create a program that generates five random numbers between 1 and 100 with two decimal places, and show me the execution results.', tools: { code_interpreter: azure.tools.codeInterpreter(), }, }); console.log(JSON.stringify(basicResult.response.body,null,2));
@vercel/ai-sdk-azure
Hello , my review is finished.
Is @vercel/ai-sdk-azure
enabled to notification between members?
Hello , I want to send message to azure members for the review using @vercel/ai-sdk-azure.
@vercel/ai-sdk-azure
@vercel/ai-sdk-azure
doesn't change clickable link.
The notification may not reach members.
Hi @tsuzaki430 , I reviewed the code as well. Yes, I manually checked this in PR, so there is no way to know if anyone mentioned @vercel/ai-sdk-azure.
Thank you for review this PR!
It was the message from gr2m about @vercel/ai-sdk-azure
.
(Maybe I'm using it incorrectly.)
Thank you so much for coming here and leaving a message😊
Uh oh!
There was an error while loading. Please reload this page.
Background
This pull request doesn't update any features to @ai-sdk/azure.
However, it adds tests that will help ensure the soundness of future updates.
I would like to add tests for when doStream and doGenerate are processed in the Responses API.
In the tests for the Responses API in @ai-sdk/openai, it is possible to obtain idempotent results for doGenerate and doStream by passing the result data chunks to the function in advance.
I would like to add similar tests for the Responses API in @ai-sdk/azure.
Summary
This pull request doesn't update any features to @ai-sdk/azure.
I created the Azure test code by referring to the OpenAI test code. I copied some parts.
createModel
function for idempotent results for doGenerate and doStream.Manual Verification
Since there were no functional changes, I confirmed that there was no change in the test results.
src/generate-text/azure-responses-code-interpreter.ts
src/stream-text/azure-responses-code-interpreter.ts
Checklist
pnpm changeset
in the project root)pnpm prettier-fix
in the project root)Future Work
Related Issues