Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion haystack_experimental/components/agents/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,6 @@ async def run_async( # type: ignore[override] # noqa: PLR0915
can use for non-blocking user interaction.
:param chat_message_store_kwargs: Optional dictionary of keyword arguments to pass to the ChatMessageStore.
For example, it can include the `chat_history_id` and `last_k` parameters for retrieving chat history.
:param kwargs: Additional data to pass to the State schema used by the Agent.
:param memory_store_kwargs: Optional dictionary of keyword arguments to pass to the MemoryStore.
It can include:
- `user_id`: The user ID to search and add memories from.
Expand Down
10 changes: 5 additions & 5 deletions haystack_experimental/components/generators/chat/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ class OpenAIChatGenerator(BaseOpenAIChatGenerator):
rag_result = llm.run(
messages=[
ChatMessage.from_user(
text="Task: Answer strictly based on the evidence provided below.\n"
"Question: Who won the Nobel Prize in Physics in 2019?\n"
"Evidence:\n"
"- Nobel Prize press release (2019): James Peebles (1/2); Michel Mayor & Didier Queloz (1/2).\n"
text="Task: Answer strictly based on the evidence provided below.\\n"
"Question: Who won the Nobel Prize in Physics in 2019?\\n"
"Evidence:\\n"
"- Nobel Prize press release (2019): James Peebles (1/2); Michel Mayor & Didier Queloz (1/2).\\n"
"Constraints: If evidence is insufficient or conflicting, refuse."
)
],
Expand All @@ -47,7 +47,7 @@ class OpenAIChatGenerator(BaseOpenAIChatGenerator):
print(f"Decision: {rag_result['replies'][0].meta['hallucination_decision']}")
print(f"Risk bound: {rag_result['replies'][0].meta['hallucination_risk']:.3f}")
print(f"Rationale: {rag_result['replies'][0].meta['hallucination_rationale']}")
print(f"Answer:\n{rag_result['replies'][0].text}")
print(f"Answer:\\n{rag_result['replies'][0].text}")
print("---")
```
"""
Expand Down
Loading