Skip to content
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 @@ -23,7 +23,7 @@ dependencies = [
]

[tool.uv.sources]
genai_utils = { git = "https://github.com/FullFact/genai-utils.git", tag = "5.0.0"}
genai_utils = { git = "https://github.com/FullFact/genai-utils.git", tag = "5.2.0"}

[build-system]
requires = ["setuptools >= 61.0",
Expand Down
4 changes: 2 additions & 2 deletions src/pastel/pastel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import numpy as np
import numpy.typing as npt
import tenacity
from genai_utils.gemini import run_prompt
from genai_utils.gemini import run_prompt_async
from google.api_core import exceptions as core_exceptions

from pastel import pastel_functions
Expand Down Expand Up @@ -207,7 +207,7 @@ async def _get_llm_answers_for_single_sentence(
"""Runs all genAI questions on the given sentence."""
sent_answers: dict[FEATURE_TYPE, float] = {}
prompt = self.make_prompt(sentence)
raw_output = run_prompt(prompt)
raw_output = await run_prompt_async(prompt)
raw_output = raw_output.strip().lower()
if "question" in raw_output:
output = raw_output[raw_output.index("0") :]
Expand Down
2 changes: 1 addition & 1 deletion tests/pastel/test_pastel.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_quantify_answers(pastel_instance: Pastel) -> None:


@patch(
"pastel.pastel.run_prompt",
"pastel.pastel.run_prompt_async",
side_effect=ValueError("Gemini failed"),
)
async def test_retries(mock_run_prompt: AsyncMock, pastel_instance: Pastel) -> None:
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.