Skip to content

No system prompt for Anthropic? #22

Answered by frankroeder
eterps asked this question in Q&A
Discussion options

You must be logged in to vote

Anthropic expects the system prompt inside the curl parameters (https://docs.anthropic.com/en/api/messages) and not inside the messages with role = system, like the OpenAI API.

Yes, it definitely would be helpful to write a comment or document it somewhere.
By default, all providers have the system prompt defines as OpenAI. However, for Anthropic I implement this exception by removing the default system prompt

function Anthropic:preprocess_messages(messages)
and adding it later to the curl call via the agent.model
model = { model = "claude-3-5…

Replies: 5 comments 14 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by eterps
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
14 replies
@eterps
Comment options

@frankroeder
Comment options

@eterps
Comment options

@frankroeder
Comment options

@eterps
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants