mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-24 12:00:52 +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)`
11 lines
331 B
Python
11 lines
331 B
Python
"""Test Prediction Guard API wrapper."""
|
|
|
|
from langchain_community.llms.predictionguard import PredictionGuard
|
|
|
|
|
|
def test_predictionguard_call() -> None:
|
|
"""Test valid call to prediction guard."""
|
|
llm = PredictionGuard(model="OpenAI-text-davinci-003")
|
|
output = llm.invoke("Say foo:")
|
|
assert isinstance(output, str)
|