Skip to content

Commit

Permalink
Address PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kgrofelnik committed Jun 26, 2024
1 parent 5efed43 commit bc1ba94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oracles/src/domain/llm/anthropic_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def execute(chat: Chat) -> Optional[ChatCompletion]:
system_prompt = NOT_GIVEN
messages = chat.messages

if messages[0]["role"] == "system":
if len(messages) > 0 and messages[0]["role"] == "system":
system_prompt = messages[0]["content"]
messages = messages[1:]
message = await client.messages.create(
Expand Down

0 comments on commit bc1ba94

Please sign in to comment.