Closed Krishna2709 closed 1 week ago
I am working on a conversational bot using Anthropic using the following example:
https://github.com/Chainlit/cookbook/tree/main/anthropic-chat
I want to set the bot's role using a system prompt. I tried the system and messages parameters, but these are not supported in the AsyncAnthropic class.
system
messages
AsyncAnthropic
AsyncAnthropic: https://github.com/anthropics/anthropic-sdk-python/blob/main/src/anthropic/resources/completions.py#L409
Okay, the Text Completions API is a Legacy API. We should use Messages API, which supports system and message parameters.
message
I am working on a conversational bot using Anthropic using the following example:
https://github.com/Chainlit/cookbook/tree/main/anthropic-chat
I want to set the bot's role using a system prompt. I tried the
system
andmessages
parameters, but these are not supported in theAsyncAnthropic
class.AsyncAnthropic: https://github.com/anthropics/anthropic-sdk-python/blob/main/src/anthropic/resources/completions.py#L409