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
2 changes: 1 addition & 1 deletion docs-website/docs/concepts/data-classes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ from haystack.dataclasses import StreamingChunk, ToolCallDelta, ReasoningContent
chunk = StreamingChunk(
content="Hello world",
start=True,
meta={"model": "gpt-3.5-turbo"},
meta={"model": "gpt-5-mini"},
)

## Tool call chunk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ from haystack_integrations.components.connectors.weave import WeaveConnector

pipe = Pipeline()
pipe.add_component("prompt_builder", ChatPromptBuilder())
pipe.add_component("llm", OpenAIChatGenerator(model="gpt-3.5-turbo"))
pipe.add_component("llm", OpenAIChatGenerator())
pipe.connect("prompt_builder.prompt", "llm.messages")

connector = WeaveConnector(pipeline_name="test_pipeline")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ generator = LlamaCppChatGenerator(
)
messages = [ChatMessage.from_user("Who is the best American actor?")]
result = generator.run(messages, generation_kwargs={"max_tokens": 128})
generated_reply = result["replies"][0].content
generated_reply = result["replies"][0].text
print(generated_reply)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ messages = [

pipe = Pipeline()
pipe.add_component("gpt-4o", OpenAIChatGenerator(model="gpt-4o"))
pipe.add_component("llama", OpenAIChatGenerator(model="gpt-3.5-turbo"))
pipe.add_component("llama", OpenAIChatGenerator())
pipe.add_component("aba", AnswerBuilder())
pipe.add_component("abb", AnswerBuilder())
pipe.add_component("joiner", AnswerJoiner())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ GeneratedAnswer(
documents=[
Document(id=cfe93bc1c274908801e6670440bf2bbba54fad792770d57421f85ffa2a4fcc94, content: 'There are over 7,000 languages spoken around the world today.', score: 7.179112),
Document(id=7f225626ad1019b273326fbaf11308edfca6d663308a4a3533ec7787367d59a2, content: 'In certain parts of the world, like the Maldives, Puerto Rico, and San Diego, you can witness the ph...', score: 1.1426818)],
meta={'model': 'gpt-3.5-turbo-0613', 'index': 0, 'finish_reason': 'stop', 'usage': {'prompt_tokens': 86, 'completion_tokens': 13, 'total_tokens': 99}})
meta={'model': 'gpt-5-mini', 'index': 0, 'finish_reason': 'stop', 'usage': {'prompt_tokens': 86, 'completion_tokens': 13, 'total_tokens': 99}})
```

## Additional References
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ query = "What is Haystack by deepset?"

result = pipe.run(data={"search": {"query": query}, "prompt_builder": {"query": query}})

print(result["llm"]["replies"][0].content)
print(result["llm"]["replies"][0].text)
```
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ prompt_builder = ChatPromptBuilder(
)
llm = OpenAIChatGenerator(
api_key=Secret.from_token("<your-api-key>"),
model="gpt-3.5-turbo",
)

pipe = Pipeline()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ prompt_builder = ChatPromptBuilder(
)
llm = OpenAIChatGenerator(
api_key=Secret.from_token("<your-api-key>"),
model="gpt-3.5-turbo",
)

pipe = Pipeline()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ from haystack.dataclasses import StreamingChunk, ToolCallDelta, ReasoningContent
chunk = StreamingChunk(
content="Hello world",
start=True,
meta={"model": "gpt-3.5-turbo"},
meta={"model": "gpt-5-mini"},
)

## Tool call chunk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ from haystack_integrations.components.connectors.weave import WeaveConnector

pipe = Pipeline()
pipe.add_component("prompt_builder", ChatPromptBuilder())
pipe.add_component("llm", OpenAIChatGenerator(model="gpt-3.5-turbo"))
pipe.add_component("llm", OpenAIChatGenerator())
pipe.connect("prompt_builder.prompt", "llm.messages")

connector = WeaveConnector(pipeline_name="test_pipeline")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ generator = LlamaCppChatGenerator(
)
messages = [ChatMessage.from_user("Who is the best American actor?")]
result = generator.run(messages, generation_kwargs={"max_tokens": 128})
generated_reply = result["replies"][0].content
generated_reply = result["replies"][0].text
print(generated_reply)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ messages = [

pipe = Pipeline()
pipe.add_component("gpt-4o", OpenAIChatGenerator(model="gpt-4o"))
pipe.add_component("llama", OpenAIChatGenerator(model="gpt-3.5-turbo"))
pipe.add_component("llama", OpenAIChatGenerator())
pipe.add_component("aba", AnswerBuilder())
pipe.add_component("abb", AnswerBuilder())
pipe.add_component("joiner", AnswerJoiner())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ GeneratedAnswer(
documents=[
Document(id=cfe93bc1c274908801e6670440bf2bbba54fad792770d57421f85ffa2a4fcc94, content: 'There are over 7,000 languages spoken around the world today.', score: 7.179112),
Document(id=7f225626ad1019b273326fbaf11308edfca6d663308a4a3533ec7787367d59a2, content: 'In certain parts of the world, like the Maldives, Puerto Rico, and San Diego, you can witness the ph...', score: 1.1426818)],
meta={'model': 'gpt-3.5-turbo-0613', 'index': 0, 'finish_reason': 'stop', 'usage': {'prompt_tokens': 86, 'completion_tokens': 13, 'total_tokens': 99}})
meta={'model': 'gpt-5-mini', 'index': 0, 'finish_reason': 'stop', 'usage': {'prompt_tokens': 86, 'completion_tokens': 13, 'total_tokens': 99}})
```

## Additional References
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ query = "What is Haystack by deepset?"

result = pipe.run(data={"search": {"query": query}, "prompt_builder": {"query": query}})

print(result["llm"]["replies"][0].content)
print(result["llm"]["replies"][0].text)
```
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ prompt_builder = ChatPromptBuilder(
)
llm = OpenAIChatGenerator(
api_key=Secret.from_token("<your-api-key>"),
model="gpt-3.5-turbo",
)

pipe = Pipeline()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ prompt_builder = ChatPromptBuilder(
)
llm = OpenAIChatGenerator(
api_key=Secret.from_token("<your-api-key>"),
model="gpt-3.5-turbo",
)

pipe = Pipeline()
Expand Down
Loading