mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-26 23:15:59 +00:00
chore: update links to chatmessage docs (#8667)
This commit is contained in:
parent
188b2a7f06
commit
99e7e343b2
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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"])
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user