fix system, consecutive same role, and empty message parsing for anthropic

This commit is contained in:
Kwindla Hultman Kramer
2024-10-14 20:56:42 -07:00
parent 2f6232fac9
commit 40b3e50815
2 changed files with 47 additions and 1 deletions

View File

@@ -94,11 +94,16 @@ async def load_conversation(function_name, tool_call_id, args, llm, context, res
await result_callback({"success": False, "error": str(e)})
# Test message munging ...
messages = [
{
"role": "system",
"content": "You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be converted to audio so don't include special characters in your answers. Respond to what the user said in a creative and helpful way.",
},
{"role": "user", "content": ""},
{"role": "assistant", "content": []},
{"role": "user", "content": "Tell me"},
{"role": "user", "content": "a joke"},
]
tools = [
{