mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
Modified PromptLayerChatOpenAI class to support function call (#6366)
Introduction of newest function calling feature doesn't work properly with PromptLayerChatOpenAI model since on the `_generate` method, functions argument are not even getting passed to the `ChatOpenAI` base class which results in empty `ai_message.additional_kwargs` Fixes #6365
This commit is contained in:
parent
e0cb3ea90c
commit
09acbb8410
@ -49,7 +49,7 @@ class PromptLayerChatOpenAI(ChatOpenAI):
|
||||
from promptlayer.utils import get_api_key, promptlayer_api_request
|
||||
|
||||
request_start_time = datetime.datetime.now().timestamp()
|
||||
generated_responses = super()._generate(messages, stop, run_manager)
|
||||
generated_responses = super()._generate(messages, stop, run_manager, **kwargs)
|
||||
request_end_time = datetime.datetime.now().timestamp()
|
||||
message_dicts, params = super()._create_message_dicts(messages, stop)
|
||||
for i, generation in enumerate(generated_responses.generations):
|
||||
|
Loading…
Reference in New Issue
Block a user