Skip to content

Commit

Permalink
restore erniebot
Browse files Browse the repository at this point in the history
  • Loading branch information
w5688414 committed Feb 26, 2024
1 parent e14086b commit d0fdbff
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
22 changes: 11 additions & 11 deletions erniebot-agent/src/erniebot_agent/chat_models/erniebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,20 +328,20 @@ def convert_response_to_output(response: ChatCompletionResponse, output_type: Ty
)
else:

# return output_type(
# content=response.result,
# function_call=None,
# plugin_info=None,
# search_info=None,
# token_usage=response.usage,
# clarify=clarify,
# )

return output_type(
content=response.rbody,
content=response.result,
function_call=None,
plugin_info=None,
search_info=None,
token_usage=None,
token_usage=response.usage,
clarify=clarify,
)

# return output_type(
# content=response.rbody,
# function_call=None,
# plugin_info=None,
# search_info=None,
# token_usage=None,
# clarify=clarify,
# )
2 changes: 1 addition & 1 deletion erniebot/src/erniebot/backends/bce.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def handle_response(cls, resp: EBResponse) -> EBResponse:
else:
raise errors.APIError(emsg, ecode=ecode)
else:
return EBResponse(resp.rcode, resp.result, resp.rheaders)
return resp


class YinianBackend(_BCELegacyBackend):
Expand Down
3 changes: 0 additions & 3 deletions erniebot/src/erniebot/resources/chat_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ class ChatCompletion(EBResource, CreatableWithStreaming):
"ernie-longtext": {
"model_id": "ernie_bot_8k",
},
"ernie-speed": {
"model_id": "ernie_speed",
},
},
},
APIType.CUSTOM: {
Expand Down

0 comments on commit d0fdbff

Please sign in to comment.