mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Fix formatting of gpt.py
This commit is contained in:
parent
34b202b868
commit
b225d1188c
1 changed files with 7 additions and 2 deletions
|
@ -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")]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue