Skip to content

Add marker AITool for enabling code interpreters - #5898

Merged
stephentoub merged 3 commits into
dotnet:mainfrom
stephentoub:codeinterpretertool
Feb 14, 2025
Merged

Add marker AITool for enabling code interpreters#5898
stephentoub merged 3 commits into
dotnet:mainfrom
stephentoub:codeinterpretertool

Conversation

@stephentoub

@stephentoubstephentoub commented Feb 13, 2025

Copy link
Copy Markdown
Member

Various AI services (Gemini, Bedrock, OpenAI, etc.) now support server-side code interpreting, where the model can generate code it can then execute in a sandbox. For good reason, they all require opting in. We can model that well as an AITool-derived type.

Microsoft Reviewers: Open in CodeFlow

Comment threadsrc/Analyzers/Microsoft.Analyzers.Local/ApiLifecycle/Utils.cs Outdated
@stephentoub
stephentoubforce-pushed the codeinterpretertool branch 2 times, most recently from 8efc6c6 to f8e1085CompareFebruary 13, 2025 19:04
@stephentoub

Copy link
Copy Markdown
MemberAuthor

@SteveSandersonMS, @eiriktsarpalis, please take a look at the changes to AIFunction / AITool. Thanks.

@dotnet-comment-bot

Copy link
Copy Markdown
Collaborator

‼️Found issues‼️

ProjectCoverage TypeExpectedActual
Microsoft.Extensions.AI.OllamaLine8078.2 🔻
Microsoft.Extensions.AI.Evaluation.ReportingLine8872.06 🔻
Microsoft.Extensions.AI.Evaluation.ReportingBranch8864.8 🔻
Microsoft.Extensions.Caching.HybridLine8682.77 🔻
Microsoft.Extensions.AI.Evaluation.QualityLine887.57 🔻
Microsoft.Extensions.AI.Evaluation.QualityBranch8816.42 🔻
Microsoft.Extensions.AI.EvaluationLine8858.67 🔻
Microsoft.Extensions.AI.EvaluationBranch8856.67 🔻
Microsoft.Extensions.AI.Evaluation.ConsoleLine888.26 🔻
Microsoft.Extensions.AI.Evaluation.ConsoleBranch8817.07 🔻
Microsoft.Extensions.AI.AbstractionsBranch8382.93 🔻
Microsoft.Gen.MetadataExtractorLine9857.35 🔻
Microsoft.Gen.MetadataExtractorBranch9862.5 🔻
Microsoft.Extensions.AI.OpenAILine7767.96 🔻
Microsoft.Extensions.AI.OpenAIBranch7749.6 🔻

🎉 Good job! The coverage increased 🎉
Update MinCodeCoverage in the project files.

ProjectExpectedActual
Microsoft.Extensions.AI.AzureAIInference9192
Microsoft.Extensions.AI8889

Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=951977&view=codecoverage-tab

@SteveSandersonMSSteveSandersonMS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Comment threadsrc/Libraries/Microsoft.Extensions.AI.Abstractions/CodeInterpreterTool.cs Outdated
Various AI services (Gemini, Bedrock, OpenAI, etc.) now support server-side code interpreting, where the model can generate code it can then execute in a sandbox. For good reason, they all require opting in. We can model that well as an AITool-derived type.
@stephentoub
stephentoub enabled auto-merge (squash) February 14, 2025 18:52
@dotnet-comment-bot

Copy link
Copy Markdown
Collaborator

‼️Found issues‼️

ProjectCoverage TypeExpectedActual
Microsoft.Extensions.AI.OpenAILine7767.92 🔻
Microsoft.Extensions.AI.OpenAIBranch7749.8 🔻
Microsoft.Extensions.AI.EvaluationLine8858.67 🔻
Microsoft.Extensions.AI.EvaluationBranch8856.67 🔻
Microsoft.Extensions.AI.Evaluation.QualityLine887.57 🔻
Microsoft.Extensions.AI.Evaluation.QualityBranch8816.42 🔻
Microsoft.Extensions.AI.AbstractionsBranch8382.85 🔻
Microsoft.Extensions.AI.Evaluation.ReportingLine8872.06 🔻
Microsoft.Extensions.AI.Evaluation.ReportingBranch8864.8 🔻
Microsoft.Extensions.AI.OllamaLine8078.2 🔻
Microsoft.Extensions.AI.AzureAIInferenceLine9190.09 🔻
Microsoft.Extensions.AI.AzureAIInferenceBranch9186.76 🔻
Microsoft.Extensions.AI.Evaluation.ConsoleLine888.26 🔻
Microsoft.Extensions.AI.Evaluation.ConsoleBranch8817.07 🔻
Microsoft.Gen.MetadataExtractorLine9857.35 🔻
Microsoft.Gen.MetadataExtractorBranch9862.5 🔻

🎉 Good job! The coverage increased 🎉
Update MinCodeCoverage in the project files.

ProjectExpectedActual
Microsoft.Extensions.AI8889
Microsoft.Extensions.Caching.Hybrid8687

Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=952853&view=codecoverage-tab

@stephentoub
stephentoub merged commit 19b1278 into dotnet:mainFeb 14, 2025
@jeffhandleyjeffhandley added the area-ai Microsoft.Extensions.AI libraries label Mar 7, 2025
@stephentoub
stephentoub deleted the codeinterpretertool branch March 21, 2025 14:26
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Apr 21, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-aiMicrosoft.Extensions.AI libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@stephentoub@dotnet-comment-bot@SteveSandersonMS@eiriktsarpalis@jeffhandley