community[patch]: update use of deprecated llm methods (#20393)

.predict and .predict_messages for BaseLanguageModel and BaseChatModel
This commit is contained in:
ccurme
2024-04-12 17:28:23 -04:00
committed by GitHub
parent 3a068b26f3
commit 38faa74c23
13 changed files with 25 additions and 24 deletions

View File

@@ -183,7 +183,7 @@ class AnthropicFunctions(BaseChatModel):
raise ValueError(
"if `function_call` provided, `functions` must also be"
)
response = self.model.predict_messages(
response = self.model.invoke(
messages, stop=stop, callbacks=run_manager, **kwargs
)
completion = cast(str, response.content)