Skip to content

Commit 99e7e34

Browse files
authored
chore: update links to chatmessage docs (#8667)
1 parent 188b2a7 commit 99e7e34

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

haystack/components/generators/chat/azure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AzureOpenAIChatGenerator(OpenAIChatGenerator):
2222
Generates text using OpenAI's models on Azure.
2323
2424
It works with the gpt-4 and gpt-3.5-turbo - type models and supports streaming responses
25-
from OpenAI API. It uses [ChatMessage](https://docs.haystack.deepset.ai/docs/data-classes#chatmessage)
25+
from OpenAI API. It uses [ChatMessage](https://docs.haystack.deepset.ai/docs/chatmessage)
2626
format in input and output.
2727
2828
You can customize how the text is generated by passing parameters to the

haystack/components/generators/chat/hugging_face_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HuggingFaceAPIChatGenerator:
2929
"""
3030
Completes chats using Hugging Face APIs.
3131
32-
HuggingFaceAPIChatGenerator uses the [ChatMessage](https://docs.haystack.deepset.ai/docs/data-classes#chatmessage)
32+
HuggingFaceAPIChatGenerator uses the [ChatMessage](https://docs.haystack.deepset.ai/docs/chatmessage)
3333
format for input and output. Use it to generate text with Hugging Face APIs:
3434
- [Free Serverless Inference API](https://huggingface.co/inference-api)
3535
- [Paid Inference Endpoints](https://huggingface.co/inference-endpoints)

haystack/components/generators/chat/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class OpenAIChatGenerator:
2828
Completes chats using OpenAI's large language models (LLMs).
2929
3030
It works with the gpt-4 and gpt-3.5-turbo models and supports streaming responses
31-
from OpenAI API. It uses [ChatMessage](https://docs.haystack.deepset.ai/docs/data-classes#chatmessage)
31+
from OpenAI API. It uses [ChatMessage](https://docs.haystack.deepset.ai/docs/chatmessage)
3232
format in input and output.
3333
3434
You can customize how the text is generated by passing parameters to the

haystack/dataclasses/chat_message.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __new__(cls, *args, **kwargs):
109109
general_msg = (
110110
"Use the `from_assistant`, `from_user`, `from_system`, and `from_tool` class methods to create a "
111111
"ChatMessage. For more information about the new API and how to migrate, see the documentation:"
112-
" https://docs.haystack.deepset.ai/docs/data-classes#chatmessage"
112+
" https://docs.haystack.deepset.ai/docs/chatmessage"
113113
)
114114

115115
if any(param in kwargs for param in LEGACY_INIT_PARAMETERS):
@@ -143,7 +143,7 @@ def __getattribute__(self, name):
143143
"The `content` attribute of `ChatMessage` has been removed. "
144144
"Use the `text` property to access the textual value. "
145145
"For more information about the new API and how to migrate, see the documentation: "
146-
"https://docs.haystack.deepset.ai/docs/data-classes#chatmessage"
146+
"https://docs.haystack.deepset.ai/docs/chatmessage"
147147
)
148148
raise AttributeError(msg)
149149
return object.__getattribute__(self, name)
@@ -358,7 +358,7 @@ def from_dict(cls, data: Dict[str, Any]) -> "ChatMessage":
358358
raise TypeError(
359359
"The `role`, `content`, `meta`, and `name` init parameters of `ChatMessage` have been removed. "
360360
"For more information about the new API and how to migrate, see the documentation: "
361-
"https://docs.haystack.deepset.ai/docs/data-classes#chatmessage"
361+
"https://docs.haystack.deepset.ai/docs/chatmessage"
362362
)
363363

364364
data["_role"] = ChatRole(data["_role"])

releasenotes/notes/new-chatmessage-7f47d5bdeb6ad6f5.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ highlights: >
33
We are introducing a refactored ChatMessage dataclass. It is more flexible, future-proof, and compatible with
44
different types of content: text, tool calls, tool calls results.
55
For information about the new API and how to migrate, see the documentation:
6-
https://docs.haystack.deepset.ai/docs/data-classes#chatmessage
6+
https://docs.haystack.deepset.ai/docs/chatmessage
77
upgrade:
88
- |
99
The refactoring of the ChatMessage dataclass includes some breaking changes, involving ChatMessage creation and
1010
accessing attributes. If you have a Pipeline containing a ChatPromptBuilder, serialized using Haystack<2.9.0,
1111
deserialization may break.
1212
For detailed information about the changes and how to migrate, see the documentation:
13-
https://docs.haystack.deepset.ai/docs/data-classes#chatmessage
13+
https://docs.haystack.deepset.ai/docs/chatmessage
1414
features:
1515
- |
1616
Changed the ChatMessage dataclass to support different types of content, including tool calls, and tool call
@@ -20,4 +20,4 @@ deprecations:
2020
The function role and ChatMessage.from_function class method have been deprecated and will be removed in
2121
Haystack 2.10.0. ChatMessage.from_function also attempts to produce a valid tool message.
2222
For more information, see the documentation:
23-
https://docs.haystack.deepset.ai/docs/data-classes#chatmessage
23+
https://docs.haystack.deepset.ai/docs/chatmessage

0 commit comments

Comments
 (0)