Skip to content

Commit

Permalink
fix claude + oneapi error
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-husky committed Mar 17, 2024
1 parent c172847 commit 84ccc9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions request_llms/bridge_chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ def predict_no_ui_long_connection(inputs, llm_kwargs, history=[], sys_prompt="",
json_data = chunkjson['choices'][0]
delta = json_data["delta"]
if len(delta) == 0: break
if "role" in delta: continue
if "content" in delta:
if delta["content"] is None: continue
if (not has_content) and has_role: continue
if (not has_content) and (not has_role): continue # raise RuntimeError("发现不标准的第三方接口:"+delta)
if has_content: # has_role = True/False
result += delta["content"]
if not console_slience: print(delta["content"], end='')
if observe_window is not None:
Expand Down

0 comments on commit 84ccc9e

Please sign in to comment.