Skip to content
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

Refactoring work to move to Azure.AI.OpenAI v2.1.0 #328

Merged
merged 2 commits into from
Jan 18, 2025

Conversation

daxian-dbw
Copy link
Member

PR Summary

  • Move to Azure.AI.OpenAI v2.1.0 and refactor the openai-gpt agent to accommodate the breaking changes in the new version.
  • Also move from SharpToken to Microsoft.ML.Tokenizers, as the latter becomes the official one for the .NET ecosystem.
  • Change to use the usage report from AI to track the tokens used for our chat history instead of trying to count the tokens ourselves, because it's almost impossible to relative-accurately calculate the token counts of all messages, especially when tool calls are involved (tool call definitions and the tool call payloads in AI response).

@daxian-dbw daxian-dbw merged commit 33009f1 into PowerShell:main Jan 18, 2025
4 checks passed
@daxian-dbw daxian-dbw deleted the openai branch January 18, 2025 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant