chore: update links to chatmessage docs (#8667)

This commit is contained in:
Stefano Fiorucci 2024-12-20 15:33:27 +01:00 committed by GitHub
parent 188b2a7f06
commit 99e7e343b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 9 deletions

View File

@ -22,7 +22,7 @@ class AzureOpenAIChatGenerator(OpenAIChatGenerator):
Generates text using OpenAI's models on Azure.
It works with the gpt-4 and gpt-3.5-turbo - type models and supports streaming responses
from OpenAI API. It uses [ChatMessage](https://docs.haystack.deepset.ai/docs/data-classes#chatmessage)
from OpenAI API. It uses [ChatMessage](https://docs.haystack.deepset.ai/docs/chatmessage)
format in input and output.
You can customize how the text is generated by passing parameters to the

View File

@ -29,7 +29,7 @@ class HuggingFaceAPIChatGenerator:
"""
Completes chats using Hugging Face APIs.
HuggingFaceAPIChatGenerator uses the [ChatMessage](https://docs.haystack.deepset.ai/docs/data-classes#chatmessage)
HuggingFaceAPIChatGenerator uses the [ChatMessage](https://docs.haystack.deepset.ai/docs/chatmessage)
format for input and output. Use it to generate text with Hugging Face APIs:
- [Free Serverless Inference API](https://huggingface.co/inference-api)
- [Paid Inference Endpoints](https://huggingface.co/inference-endpoints)

View File

@ -28,7 +28,7 @@ class OpenAIChatGenerator:
Completes chats using OpenAI's large language models (LLMs).
It works with the gpt-4 and gpt-3.5-turbo models and supports streaming responses
from OpenAI API. It uses [ChatMessage](https://docs.haystack.deepset.ai/docs/data-classes#chatmessage)
from OpenAI API. It uses [ChatMessage](https://docs.haystack.deepset.ai/docs/chatmessage)
format in input and output.
You can customize how the text is generated by passing parameters to the

View File

@ -109,7 +109,7 @@ class ChatMessage:
general_msg = (
"Use the `from_assistant`, `from_user`, `from_system`, and `from_tool` class methods to create a "
"ChatMessage. For more information about the new API and how to migrate, see the documentation:"
" https://docs.haystack.deepset.ai/docs/data-classes#chatmessage"
" https://docs.haystack.deepset.ai/docs/chatmessage"
)
if any(param in kwargs for param in LEGACY_INIT_PARAMETERS):
@ -143,7 +143,7 @@ class ChatMessage:
"The `content` attribute of `ChatMessage` has been removed. "
"Use the `text` property to access the textual value. "
"For more information about the new API and how to migrate, see the documentation: "
"https://docs.haystack.deepset.ai/docs/data-classes#chatmessage"
"https://docs.haystack.deepset.ai/docs/chatmessage"
)
raise AttributeError(msg)
return object.__getattribute__(self, name)
@ -358,7 +358,7 @@ class ChatMessage:
raise TypeError(
"The `role`, `content`, `meta`, and `name` init parameters of `ChatMessage` have been removed. "
"For more information about the new API and how to migrate, see the documentation: "
"https://docs.haystack.deepset.ai/docs/data-classes#chatmessage"
"https://docs.haystack.deepset.ai/docs/chatmessage"
)
data["_role"] = ChatRole(data["_role"])

View File

@ -3,14 +3,14 @@ highlights: >
We are introducing a refactored ChatMessage dataclass. It is more flexible, future-proof, and compatible with
different types of content: text, tool calls, tool calls results.
For information about the new API and how to migrate, see the documentation:
https://docs.haystack.deepset.ai/docs/data-classes#chatmessage
https://docs.haystack.deepset.ai/docs/chatmessage
upgrade:
- |
The refactoring of the ChatMessage dataclass includes some breaking changes, involving ChatMessage creation and
accessing attributes. If you have a Pipeline containing a ChatPromptBuilder, serialized using Haystack<2.9.0,
deserialization may break.
For detailed information about the changes and how to migrate, see the documentation:
https://docs.haystack.deepset.ai/docs/data-classes#chatmessage
https://docs.haystack.deepset.ai/docs/chatmessage
features:
- |
Changed the ChatMessage dataclass to support different types of content, including tool calls, and tool call
@ -20,4 +20,4 @@ deprecations:
The function role and ChatMessage.from_function class method have been deprecated and will be removed in
Haystack 2.10.0. ChatMessage.from_function also attempts to produce a valid tool message.
For more information, see the documentation:
https://docs.haystack.deepset.ai/docs/data-classes#chatmessage
https://docs.haystack.deepset.ai/docs/chatmessage