Fix formatting of gpt.py

This commit is contained in:
sabaimran 2023-09-18 11:09:02 -07:00
parent 34b202b868
commit b225d1188c

View file

@ -42,7 +42,12 @@ def summarize(session, model, api_key=None, temperature=0.5, max_tokens=200):
def extract_questions(
text, model: Optional[str] = "gpt-4", conversation_log={}, api_key=None, temperature=0, max_tokens=100
text,
model: Optional[str] = "gpt-4",
conversation_log={},
api_key=None,
temperature=0,
max_tokens=100,
):
"""
Infer search queries to retrieve relevant notes to answer user query
@ -70,7 +75,7 @@ def extract_questions(
bob_age={current_new_year.year - 1984},
chat_history=chat_history,
text=text,
yesterday_date=(today - timedelta(days=1)).strftime("%Y-%m-%d")
yesterday_date=(today - timedelta(days=1)).strftime("%Y-%m-%d"),
)
messages = [ChatMessage(content=prompt, role="assistant")]