AashitaK commited on
Commit
8b2a015
·
verified ·
1 Parent(s): a4fe64d

Update utils/response_manager.py

Browse files
Files changed (1) hide show
  1. utils/response_manager.py +4 -3
utils/response_manager.py CHANGED
@@ -87,9 +87,6 @@ class ResponseManager:
87
  Returns:
88
  list: A list of dictionaries representing the conversation, including the generated response.
89
  """
90
- # Prepare the input for the API call
91
- input_data = [{"role": "developer", "content": self.meta_prompt}] if session['previous_response_id'] is None else []
92
- input_data.append({"role": "user", "content": query})
93
 
94
  # Validate session_id
95
  if session_id not in self.session_histories:
@@ -98,6 +95,10 @@ class ResponseManager:
98
 
99
  # Retrieve session object
100
  session = self.session_histories[session_id]
 
 
 
 
101
 
102
  # Validate the query
103
  if not query.strip():
 
87
  Returns:
88
  list: A list of dictionaries representing the conversation, including the generated response.
89
  """
 
 
 
90
 
91
  # Validate session_id
92
  if session_id not in self.session_histories:
 
95
 
96
  # Retrieve session object
97
  session = self.session_histories[session_id]
98
+
99
+ # Prepare the input for the API call
100
+ input_data = [{"role": "developer", "content": self.meta_prompt}] if session['previous_response_id'] is None else []
101
+ input_data.append({"role": "user", "content": query})
102
 
103
  # Validate the query
104
  if not query.strip():