Skip to content

Commit

Permalink
Fixes #9, character length
Browse files Browse the repository at this point in the history
  • Loading branch information
JolanThomassin committed Jan 15, 2024
1 parent a918685 commit e9e0533
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/generate-qna.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ def generate_question(system_prompt, user_prompt, json_template, project_db):
user_prompt, str(random_chunk), json_template
)
total_length = len(system_prompt) + len(constructed_user_prompt)
average_character_length += total_length


if total_length < CHARACTER_LIMIT:
average_character_length += total_length
response = openai.get_chat_answer(
system_prompt, constructed_user_prompt, 2000
)
Expand Down

0 comments on commit e9e0533

Please sign in to comment.