Skip to content

Commit

Permalink
Fix type error in test introduced by ollama 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Dec 4, 2024
1 parent 46d8ab8 commit fbf91ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/pytest/test_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,11 @@ def test_as_ollama_message():
import ollama
from ollama import Message as OllamaMessage

assert "ollama._types.Message" in str(ollama.chat.__annotations__["messages"])
# ollama 0.4.2 added Callable to the type hints, but pyright complains about
# missing arguments to the Callable type. We'll ignore this for now.
chat = ollama.chat # type: ignore

assert "ollama._types.Message" in str(chat.__annotations__["messages"])

from shiny.ui._chat_provider_types import as_ollama_message

Expand Down

0 comments on commit fbf91ee

Please sign in to comment.