Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Commit

Permalink
Merge pull request #366 from openchatai/fix/base_prompts
Browse files Browse the repository at this point in the history
warn -> error on pydantic error
  • Loading branch information
codebanesr authored Dec 6, 2023
2 parents 59d18ea + 23051e7 commit 9a97377
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions llm-server/routes/workflow/utils/process_conversation_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ def process_conversation_step(
return d

except OutputParserException as e:
logger.error("Failed to parse json", data=content)
logger.error("Failed to parse json", err=str(e))
logger.warn("Failed to parse json", data=content, err=str(e))
return BotMessage(bot_message=content, ids=[], missing_information=None)
except Exception as e:
logger.error("unexpected error occured", err=str(e))
logger.warn("unexpected error occured", err=str(e))
return BotMessage(ids=[], bot_message=str(e), missing_information=None)
2 changes: 2 additions & 0 deletions llm-server/routes/workflow/utils/run_openapi_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,6 @@ async def run_openapi_operations(
app= app,
error=str(e),
)

return str(e)
return convert_json_to_text(text, record_info, api_request_data, bot_id=bot_id)
2 changes: 1 addition & 1 deletion llm-server/utils/get_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def log(self, level, event, **kwargs):
self.logger.log(
level,
event=event,
**{k: v for k, v in kwargs.items() if k not in ("exc_info", "extra")},
**kwargs
)

def info(self, event, **kwargs):
Expand Down

0 comments on commit 9a97377

Please sign in to comment.