mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-15 14:36:54 +00:00
chore(community): update to OpenLLM 0.6 (#24609)
Update to OpenLLM 0.6, which we decides to make use of OpenLLM's OpenAI-compatible endpoint. Thus, OpenLLM will now just become a thin wrapper around OpenAI wrapper. Signed-off-by: Aaron Pham <contact@aarnphm.xyz> --------- Signed-off-by: Aaron Pham <contact@aarnphm.xyz> Co-authored-by: ccurme <chester.curme@gmail.com>
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
"""Test OpenLLM wrapper."""
|
||||
"""Test OpenLLM API wrapper."""
|
||||
|
||||
import pytest
|
||||
|
||||
from langchain_community.llms.openllm import OpenLLM
|
||||
|
||||
|
||||
def test_openllm_llm_local() -> None:
|
||||
llm = OpenLLM(model_name="flan-t5", model_id="google/flan-t5-small")
|
||||
output = llm.invoke("Say foo:")
|
||||
assert isinstance(output, str)
|
||||
|
||||
|
||||
def test_openllm_with_kwargs() -> None:
|
||||
llm = OpenLLM(
|
||||
model_name="flan-t5", model_id="google/flan-t5-small", temperature=0.84
|
||||
)
|
||||
output = llm.invoke("Say bar:")
|
||||
@pytest.mark.scheduled
|
||||
def test_openai_call() -> None:
|
||||
"""Test valid call to openai."""
|
||||
llm = OpenLLM()
|
||||
output = llm.invoke("Say something nice:")
|
||||
assert isinstance(output, str)
|
||||
|
Reference in New Issue
Block a user