Skip to content

Commit

Permalink
Fix the bug where Azure is not compatible with function role
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed May 27, 2024
1 parent 0d4ddae commit 71a8e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ModelMerge/models/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def ask_stream(
"role": mess["role"],
"content": mess["content"][0]["text"]
}
if "'function' is not an allowed role" in response.text:
elif "'function' is not an allowed role" in response.text:
if json_post["messages"][-1]["role"] == "function":
mess = json_post["messages"][-1]
json_post["messages"][-1] = {
Expand Down

0 comments on commit 71a8e2c

Please sign in to comment.