Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tests = [
"langchain_community",
"langchain_google_genai",
"langchain_groq",
"langchain-ollama',
"langchain-ollama",
"pytest-asyncio>=0.18.2,!=0.22.0,<0.23.0",
"pytest-env>=0.8,<2.0",
"pytest-rerunfailures>=10,<14",
Expand Down
4 changes: 2 additions & 2 deletions src/controlflow/memory/providers/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class PostgresMemory(MemoryProvider):
description="Dimension of the embedding vectors. Match your model's output.",
)

embedding_fn: Callable = Field(
embedding_fn: OpenAIEmbeddings = Field(
default_factory=lambda: OpenAIEmbeddings(
model="text-embedding-ada-002",
),
Expand Down Expand Up @@ -263,7 +263,7 @@ class AsyncPostgresMemory(AsyncMemoryProvider):
description="Dimension of the embedding vectors. Must match your model output size.",
)

embedding_fn: Callable = Field(
embedding_fn: OpenAIEmbeddings = Field(
default_factory=lambda: OpenAIEmbeddings(model="text-embedding-ada-002"),
description="Function that turns a string into a numeric vector.",
)
Expand Down
2 changes: 2 additions & 0 deletions tests/llm/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ def test_get_groq_model(monkeypatch):
assert isinstance(model, ChatGroq)
assert model.model_name == "mixtral-8x7b-32768"


def test_get_ollama_model(monkeypatch):
model = get_model("ollama/qwen2.5")
assert isinstance(model, ChatOllama)
assert model.model == "qwen2.5"


def test_get_model_with_invalid_format():
with pytest.raises(ValueError, match="The model `gpt-4o` is not valid."):
get_model("gpt-4o")
Expand Down
Loading