mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 14:31:55 +00:00
patch: remove usage of llm, chat model __call__ (#20788)
- `llm(prompt)` -> `llm.invoke(prompt)` - `llm(prompt=prompt` -> `llm.invoke(prompt)` (same with `messages=`) - `llm(prompt, callbacks=callbacks)` -> `llm.invoke(prompt, config={"callbacks": callbacks})` - `llm(prompt, **kwargs)` -> `llm.invoke(prompt, **kwargs)`
This commit is contained in:
@@ -75,7 +75,7 @@ class Anyscale(BaseOpenAI):
|
||||
# To leverage Ray for parallel processing
|
||||
@ray.remote(num_cpus=1)
|
||||
def send_query(llm, text):
|
||||
resp = llm(text)
|
||||
resp = llm.invoke(text)
|
||||
return resp
|
||||
futures = [send_query.remote(anyscalellm, text) for text in texts]
|
||||
results = ray.get(futures)
|
||||
|
Reference in New Issue
Block a user