-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support for tools in
AnthropicChatGenerator
(#118)
* Initial implementation * Tool use for streaming * Add system message support, proper generation_kwargs handling * system message format * Minor * Minor fixes * Improve pydocs * Check duplicate tools * Update haystack_experimental/components/generators/anthropic/__init__.py Co-authored-by: Stefano Fiorucci <[email protected]> * Update haystack_experimental/components/generators/anthropic/chat/chat_generator.py Co-authored-by: Stefano Fiorucci <[email protected]> * Update haystack_experimental/components/generators/anthropic/chat/chat_generator.py Co-authored-by: Stefano Fiorucci <[email protected]> * Update haystack_experimental/components/generators/anthropic/chat/chat_generator.py Co-authored-by: Stefano Fiorucci <[email protected]> * PR feedback * Fix class pydoc * PR feedback * Handle tools round trip * PR feedback * Small lint * Parallel tool support * Special handing for ToolCallResult messages * Simplify _convert_messages_to_anthropic_format * More tests, improve coverage * Increase coverage * Update haystack_experimental/components/generators/anthropic/chat/chat_generator.py Co-authored-by: Stefano Fiorucci <[email protected]> * PR feedback * PR feedback - rename method * try simplification * PR feedback - pydoc updates * pylint * Simplify main message conversion algorithm * further simplifaction + test * update readme --------- Co-authored-by: Stefano Fiorucci <[email protected]>
- Loading branch information
Showing
7 changed files
with
1,371 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
haystack_experimental/components/generators/anthropic/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2022-present deepset GmbH <[email protected]> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from .chat.chat_generator import AnthropicChatGenerator | ||
|
||
__all__ = ["AnthropicChatGenerator"] |
7 changes: 7 additions & 0 deletions
7
haystack_experimental/components/generators/anthropic/chat/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2022-present deepset GmbH <[email protected]> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from haystack_experimental.components.generators.anthropic.chat.chat_generator import AnthropicChatGenerator | ||
|
||
__all__ = ["AnthropicChatGenerator"] |
Oops, something went wrong.