Skip to content

Commit

Permalink
Append user query to history in LLMRequest.to_completion_kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Dec 18, 2024
1 parent 6212c86 commit 3f63178
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions neon_data_models/models/api/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def to_completion_kwargs(self, mq2role: dict = None) -> dict:
msg["role"] = mq2role.get(msg["role"]) or msg["role"]
history.insert(0, {"role": "system",
"content": self.persona.system_prompt})
history.append({"role": "user", "content": self.query})
return {"model": self.model,
"messages": history,
"max_tokens": self.max_tokens,
Expand Down

0 comments on commit 3f63178

Please sign in to comment.