diff --git a/haystack_experimental/components/agents/agent.py b/haystack_experimental/components/agents/agent.py index 7615ad35..6645a935 100644 --- a/haystack_experimental/components/agents/agent.py +++ b/haystack_experimental/components/agents/agent.py @@ -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. diff --git a/haystack_experimental/components/generators/chat/openai.py b/haystack_experimental/components/generators/chat/openai.py index 2fa45896..154ff1eb 100644 --- a/haystack_experimental/components/generators/chat/openai.py +++ b/haystack_experimental/components/generators/chat/openai.py @@ -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." ) ], @@ -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("---") ``` """