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

.Net: Bug: .NET Semantic Kernel Function Calling Not Working with Anthropic via Amazon Connector #10591

Open
samitugal opened this issue Feb 18, 2025 · 0 comments
Assignees
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code

Comments

@samitugal
Copy link

samitugal commented Feb 18, 2025

Describe the Bug

When I connect my Anthropic model via Microsoft.SemanticKernel.Connectors.Amazon to translate these sentences into English, the query processes I wrote as plugins — which normally work — are not receiving any requests.

However, when I perform the same operation with OpenAI services, the model can easily access these plugins. Unfortunately, this is not the case with Anthropic.

I'm experiencing the same issue with the latest o3-mini reasoning model. Could it be that the Amazon Connector is still in an alpha experimental phase, or that the OpenAI o3-mini version is too new, causing the function calling feature not to work properly?

Observations

When I send the same request to the gpt-4o-2024-08-06 model, the breakpoint it hits is:

OpenAI Breakpoint

However, when I send the same request to the anthropic.claude-3-5-sonnet-20240620-v1:0 model, it does not hit the breakpoint.

Anthropic Breakpoint

Implementation Details

The implementation for both clients is almost identical. The only difference is:

  • For OpenAI services:

    • I use OpenAIPromptExecutionSettings and the AddOpenAIChatCompletion methods.
      OpenAI Implementation
  • For Anthropic services:

    • I use the base class PromptExecutionSettings because I couldn't find an implemented class specifically for AWS services.
      Anthropic Implementation

Platform Information

  • Language: C#

  • NuGet Packages:

    • Microsoft.SemanticKernel: 1.37.0
    • Microsoft.SemanticKernel.Connectors.Amazon: 1.37.0-alpha
    • AWSBedrocRuntime: 4.0.0-preview.6
  • AI Models:

    • Anthropic Model: anthropic.claude-3-5-sonnet-20240620-v1:0
    • OpenAI Model: gpt-4o-2024-08-06
  • IDE: Microsoft Visual Studio Professional 2022 (3) (64-bit) - Current Version 17.13.0

  • OS: Windows


Possible Causes

  1. The Microsoft.SemanticKernel.Connectors.Amazon package is still in the alpha stage and might not fully support function calling.
  2. The o3-mini model from OpenAI is very new, and compatibility issues might exist with the current function-calling implementation.
  3. Missing AWS-specific PromptExecutionSettings class might be causing the model to bypass the plugin execution logic.

Additional Information

I'm happy to provide more details or logs if needed.
Thanks for your time and support!

@samitugal samitugal added the bug Something isn't working label Feb 18, 2025
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Feb 18, 2025
@github-actions github-actions bot changed the title Bug: .NET Semantic Kernel Function Calling Not Working with Anthropic via Amazon Connector .Net: Bug: .NET Semantic Kernel Function Calling Not Working with Anthropic via Amazon Connector Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

No branches or pull requests

4 participants