Skip to content

Commit

Permalink
[bug] Running chat without data fails on second message due to nonexi…
Browse files Browse the repository at this point in the history
…stent tool message (#372)

Co-authored-by: Ian Seabock (Centific Technologies Inc) <[email protected]>
  • Loading branch information
iseabock and Ian Seabock (Centific Technologies Inc) authored Nov 8, 2023
1 parent 4ef422f commit e249cba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,11 @@ def conversation_without_data(request_body):
]

for message in request_messages:
messages.append({
"role": message["role"] ,
"content": message["content"]
})
if message:
messages.append({
"role": message["role"] ,
"content": message["content"]
})

response = openai.ChatCompletion.create(
engine=AZURE_OPENAI_MODEL,
Expand Down

0 comments on commit e249cba

Please sign in to comment.