mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-02 04:58:46 +00:00
- `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)`
9 lines
251 B
Python
9 lines
251 B
Python
from langchain_community.llms.openlm import OpenLM
|
|
|
|
|
|
def test_openlm_call() -> None:
|
|
"""Test valid call to openlm."""
|
|
llm = OpenLM(model_name="dolly-v2-7b", max_tokens=10)
|
|
output = llm.invoke("Say foo:")
|
|
assert isinstance(output, str)
|