agentscope-ai / agentscope-ai/agentscope-typescript

feat: support Anthropic API and add unit tests

Abierto
#6 0 comentarios 0 reacciones 0 asignados Ver en GitHub
help wanted
Lenguaje dominante
TypeScript
Estrellas
81
Forks
19
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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](https://github.com/agentscope-ai/agentscope-typescript/blob/main/packages/agentscope/src/model/dashscope-model.ts) and its [unit tests](https://github.com/agentscope-ai/agentscope-typescript/blob/main/packages/agentscope/src/model/dashscope-model.test.ts)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.