angry-meow commited on
Commit
f0238f8
1 Parent(s): 0af86c0

stop pm from sending back to writing team after a final post is made

Browse files
Files changed (2) hide show
  1. graph.py +2 -1
  2. prompts.py +4 -1
graph.py CHANGED
@@ -215,7 +215,8 @@ def overall_supervisor(state):
215
  init_user_query = state["user_input"]
216
  message_to_manager = state['message_to_manager']
217
  last_active_team = state['last_active_team']
218
- supervisor_result = overall_supervisor_chain.invoke({"query": init_user_query, "message_to_manager": message_to_manager, "last_active_team": last_active_team})
 
219
  print(supervisor_result)
220
  lines = supervisor_result.split('\n')
221
  for line in lines:
 
215
  init_user_query = state["user_input"]
216
  message_to_manager = state['message_to_manager']
217
  last_active_team = state['last_active_team']
218
+ final_post = state['final_post']
219
+ supervisor_result = overall_supervisor_chain.invoke({"query": init_user_query, "message_to_manager": message_to_manager, "last_active_team": last_active_team, "final_post": final_post})
220
  print(supervisor_result)
221
  lines = supervisor_result.split('\n')
222
  for line in lines:
prompts.py CHANGED
@@ -100,15 +100,18 @@ overall_supervisor_prompt = ChatPromptTemplate.from_template(
100
 
101
  After determining the topic, or if a specific topic has already been supplied, you must determine which of the teams should perform their task next.
102
 
103
- The available actions are the names of your teams (to indicate which team should run next), or 'FINISH' to indicate that a sufficient quality social media post is ready to share with the user.
104
 
105
  To help you determine which team should run next, or if the post is ready to share with the user, you will have access to the latest team supervisor requests and messages, as well as a flag indicating which team was most recently active.
106
 
107
  If you have to pass along a message to the next team, such as if the writing team had asked that the research team collect more information, or if you want to give specific direction to a supervisor, you can do so.
108
 
 
 
109
  User query: {query}
110
  Team message: {message_to_manager}
111
  Last active team: {last_active_team}
 
112
 
113
  Output:
114
  Extracted Topic: ...
 
100
 
101
  After determining the topic, or if a specific topic has already been supplied, you must determine which of the teams should perform their task next.
102
 
103
+ The available actions are the names of your teams (to indicate which team should run next), or 'FINISH' to indicate that the writing team has sent you a sufficient quality social media post draft that is ready to share with the user.
104
 
105
  To help you determine which team should run next, or if the post is ready to share with the user, you will have access to the latest team supervisor requests and messages, as well as a flag indicating which team was most recently active.
106
 
107
  If you have to pass along a message to the next team, such as if the writing team had asked that the research team collect more information, or if you want to give specific direction to a supervisor, you can do so.
108
 
109
+ If the writing team has given you a quality final post draft, it will be suplied to you as well.
110
+
111
  User query: {query}
112
  Team message: {message_to_manager}
113
  Last active team: {last_active_team}
114
+ Final post: {final_draft}
115
 
116
  Output:
117
  Extracted Topic: ...