Skip to content

feat: support Anthropic API and add unit tests #6

Description

@DavdGao

The implementation includes the following files and classes:

  • AnthropicChatModel in packages/agentscope/src/model/anthropic-model.ts
  • Unit tests in packages/agentscope/tests/model/anthropic-model.test.ts

The expected functionalities to support:

  • Streaming and non-streaming responses
  • Tool calling API
  • Tool choice

The unit tests should use mock responses to cover the following cases:

  • call function with:
    • Streaming response with tool calling
    • Non-streaming response with tool calling
  • _formatToolChoice method
  • _formatToolSchemas method

Example implementation refers to dashscope and its unit tests

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedOpen to community contributions, feel free to claim this issue

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions