Skip to content

Commit

Permalink
Merge pull request #17 from bettersg/agent/dev/openai-assistants-api-1
Browse files Browse the repository at this point in the history
Agent/dev/openai assistants api 1
  • Loading branch information
sarge1989 authored Mar 9, 2024
2 parents 6c31d8e + 0d14416 commit da94b7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class VoteInitialisation(BaseModel):

class Vote(BaseModel):
category: FactCheckCategory
truthScore: Optional[Annotated[int, Field(ge=0, le=5)]] = None
truthScore: Optional[Annotated[int, Field(ge=1, le=5)]] = None

class UnsupportedMessageTypeException(Exception):
pass
2 changes: 2 additions & 0 deletions implementation/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def agent_report(self, reasoning, category, truth_score = None, subjects = None)
self.reasoning = reasoning
self.category = category
self.truth_score = truth_score
logging.info(f"Agent report received\nReasoning: {reasoning}\nCategory: {category}\nTruth Score: {truth_score}")
return "Report Received"

def check_message(self, message: MessagePayload):
Expand Down Expand Up @@ -96,6 +97,7 @@ def process_call(tool_call):
run_id=run.id,
tool_outputs=tool_outputs
)
logging.info(f"Agent complete: {agent_complete}, thread_id: {thread.id}, run_id: {run.id}")
if not agent_complete:
raise TimeoutError("Agent did not complete in time")
if not self.category:
Expand Down

0 comments on commit da94b7a

Please sign in to comment.