anthropics / anthropic-sdk-typescript

Access to Anthropic's safety-first language model APIs
https://www.npmjs.com/package/@anthropic-ai/sdk
MIT License
505 stars 49 forks source link

typescript has signatures, but none of those signatures are compatible with each other. #443

Closed FlowerWrong closed 1 week ago

FlowerWrong commented 1 week ago

Hi! I am using this sdk in production. When I upgraded to a version later than 0.20.6, I got this error has signatures, but none of those signatures are compatible with each other.. Can you help me?

截屏2024-06-24 09 42 45
await anthropicClient.messages
            .create(
              {
                stream: true,
                messages: sentMessages,
                model: reqModel,
                max_tokens: 1024,
                top_p: otherParams?.top_p,
                top_k: otherParams?.top_k,
                system: otherParams?.system,
              } as any,
              reqConfig,
            )
rattrayalex commented 1 week ago

Can you share more of your surrounding code? for example, what is reqConfig?

FlowerWrong commented 1 week ago

Can you share more of your surrounding code? for example, what is reqConfig?

This error has nothing to do with him.