Skip to content

Commit

Permalink
Merge pull request #11 from bettersg/agent/dev/openai-assistants-api-1
Browse files Browse the repository at this point in the history
added api caller
  • Loading branch information
sarge1989 authored Feb 25, 2024
2 parents 320622d + 9d6e71d commit cfeffc6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
24 changes: 14 additions & 10 deletions implementation/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,19 @@ def process_call(tool_call):
output = tool_dict[function_name](**function_arguments)
return output

thread = client.beta.threads.create(
messages=[
{
"role": "user",
"content": message.text,
}
]
)

##TODO: Implement your message checking logic here
# thread = client.beta.threads.create(
# messages=[
# {
# "role": "user",
# "content": message.text,
# }
# ]
# )

# run = client.beta.threads.runs.create(
# thread_id=thread.id,
# assistant_id="TO FILL",
# )


return Vote(category="unsure", truthScore=None) #change this
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ pydantic~=2.6.1
requests~=2.31.0
google-auth~=2.28.1
openai~=1.12.0
langchain~=0.1.9
langchain~=0.1.9
google-api-python-client~=2.119.0

0 comments on commit cfeffc6

Please sign in to comment.