Skip to content

Commit

Permalink
Update openai.py generator
Browse files Browse the repository at this point in the history
Added `user_question` to assistant prompt for completeness
  • Loading branch information
rishsriv authored and wongjingping committed Dec 2, 2023
1 parent 024ff01 commit a71bf14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions query_generators/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ def generate_query(self, question: str, instructions: str) -> dict:
table_metadata_string=prune_metadata_str(question, self.db_name),
)

assistant_prompt = assistant_prompt.format(
user_question=question,
)

messages = []
messages.append({"role": "system", "content": sys_prompt})
messages.append({"role": "user", "content": user_prompt})
Expand Down

0 comments on commit a71bf14

Please sign in to comment.