Skip to content

Commit

Permalink
feat: support for tools in OpenAIChatGenerator (#57)
Browse files Browse the repository at this point in the history
* first draft

* progress

* serde

* serde

* progress + tests

* header

* unused imports

* lazyimport

* toolinvocationerror

* linting

* draft

* progress

* more tests

* more tests

* inherit from haystack

* rm _check_finish_reason (inherited)

* rename internal methods

* better chatmessages conversion to openai format

* simplify logic

* wip

* handle invalid JSON strings

* better warning and more tests

* rm match from tests

* make method internal

* test type

* simplify openai conversion

* from_dict full
  • Loading branch information
anakin87 authored Aug 19, 2024
1 parent c13eec4 commit ab3fe0c
Show file tree
Hide file tree
Showing 4 changed files with 1,059 additions and 3 deletions.
11 changes: 11 additions & 0 deletions haystack_experimental/components/generators/chat/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-FileCopyrightText: 2022-present deepset GmbH <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0

from haystack_experimental.components.generators.chat.openai import ( # noqa: I001 (otherwise we end up with partial imports)
OpenAIChatGenerator,
)

__all__ = [
"OpenAIChatGenerator",
]
Loading

0 comments on commit ab3fe0c

Please sign in to comment.