mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-29 02:44:25 +01:00
Integrate plugin.handle_text_embedding hook (#2804)
* add feature custom text embedding in plugin * black code format * _get_embedding_with_plugin() * Fix docstring & type hint --------- Co-authored-by: Reinier van der Leer <github@pwuts.nl>
This commit is contained in:
@@ -54,6 +54,7 @@ def test_dummy_plugin_default_methods(dummy_plugin):
|
||||
assert not dummy_plugin.can_handle_pre_command()
|
||||
assert not dummy_plugin.can_handle_post_command()
|
||||
assert not dummy_plugin.can_handle_chat_completion(None, None, None, None)
|
||||
assert not dummy_plugin.can_handle_text_embedding(None)
|
||||
|
||||
assert dummy_plugin.on_response("hello") == "hello"
|
||||
assert dummy_plugin.post_prompt(None) is None
|
||||
@@ -77,3 +78,4 @@ def test_dummy_plugin_default_methods(dummy_plugin):
|
||||
assert isinstance(post_command, str)
|
||||
assert post_command == "upgraded successfully!"
|
||||
assert dummy_plugin.handle_chat_completion(None, None, None, None) is None
|
||||
assert dummy_plugin.handle_text_embedding(None) is None
|
||||
|
||||
Reference in New Issue
Block a user