Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

Commit ca4adb0

Browse files
authored
Merge pull request #403 from webcoderz/main
fix pyproject bug
2 parents daf0883 + 8554771 commit ca4adb0

File tree

4 files changed

+42
-319
lines changed

4 files changed

+42
-319
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ tests = [
5151
"langchain_community",
5252
"langchain_google_genai",
5353
"langchain_groq",
54-
"langchain-ollama',
54+
"langchain-ollama",
5555
"pytest-asyncio>=0.18.2,!=0.22.0,<0.23.0",
5656
"pytest-env>=0.8,<2.0",
5757
"pytest-rerunfailures>=10,<14",

src/controlflow/memory/providers/postgres.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class PostgresMemory(MemoryProvider):
7474
description="Dimension of the embedding vectors. Match your model's output.",
7575
)
7676

77-
embedding_fn: Callable = Field(
77+
embedding_fn: OpenAIEmbeddings = Field(
7878
default_factory=lambda: OpenAIEmbeddings(
7979
model="text-embedding-ada-002",
8080
),
@@ -263,7 +263,7 @@ class AsyncPostgresMemory(AsyncMemoryProvider):
263263
description="Dimension of the embedding vectors. Must match your model output size.",
264264
)
265265

266-
embedding_fn: Callable = Field(
266+
embedding_fn: OpenAIEmbeddings = Field(
267267
default_factory=lambda: OpenAIEmbeddings(model="text-embedding-ada-002"),
268268
description="Function that turns a string into a numeric vector.",
269269
)

tests/llm/test_models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ def test_get_groq_model(monkeypatch):
4646
assert isinstance(model, ChatGroq)
4747
assert model.model_name == "mixtral-8x7b-32768"
4848

49+
4950
def test_get_ollama_model(monkeypatch):
5051
model = get_model("ollama/qwen2.5")
5152
assert isinstance(model, ChatOllama)
5253
assert model.model == "qwen2.5"
5354

55+
5456
def test_get_model_with_invalid_format():
5557
with pytest.raises(ValueError, match="The model `gpt-4o` is not valid."):
5658
get_model("gpt-4o")

0 commit comments

Comments
 (0)