Skip to content

Commit

Permalink
Update intent logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bheyman-scottlogic committed Apr 11, 2024
1 parent 4c9dee3 commit 5a276df
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions backend/director.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@

def question(question):
logger.info("director calling call_model method")
response = determine_intent(question)
if response == "FALSE":
return call_model(system_prompt, user_prompt=question)
else:
hasIntent = determine_intent(question) == 'TRUE'

if hasIntent:
goal_saved = create_user_goal(question)
return "I have created a goal for you. Goal: {0}. Description: {1}".format(goal_saved['name'], goal_saved['description'])

return call_model(system_prompt, user_prompt=question)

def determine_intent(question):
return call_model(system_prompt_to_determine_intent, user_prompt=question)

0 comments on commit 5a276df

Please sign in to comment.