-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
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));
}
}
}
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 |
|
Hello , I want to send message to azure members for the review using @vercel/ai-sdk-azure. @vercel/ai-sdk-azure |
|
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! Thank you so much for coming here and leaving a message😊 |
unfortunately it didn't work out with the team. You can ping the team and other interested folks in #9863. Sorry it took to respond, we have all been busy with https://vercel.com/ship/ai 😁 |
gr2m
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.
This is much appreciated, thank you @tsuzaki430!
|
|
|
Thank you for your review. I was very happy to have this pull request merged. |
|
fyi I'm looking into the failed backport now |
…sponses API (#9937) This is an automated backport of #9431 to the release-v5.0 branch --------- Co-authored-by: tsuzaki430 <[email protected]> Co-authored-by: Gregor Martynus <[email protected]>
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.
createModelfunction 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 changesetin the project root)pnpm prettier-fixin the project root)Future Work
Related Issues