Skip to content
Open
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: 2 additions & 0 deletions src/paperqa/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@ async def aquery(
summary_llm_model: LLMModel | None = None,
embedding_model: EmbeddingModel | None = None,
partitioning_fn: Callable[[Embeddable], int] | None = None,
response_schema: BaseModel | None = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be output_type: type[BaseModel] | TypeAdapter | JSONSchema | None = None, are you sure it works?

Can you add or expand a unit test in tests/test_paperqa.py confirming this?

) -> PQASession:
query_settings = get_settings(settings)
answer_config = query_settings.answer
Expand Down Expand Up @@ -862,6 +863,7 @@ async def aquery(
messages=messages,
callbacks=callbacks,
name="answer",
response_format=response_schema,
)
answer_text = cast("str", answer_result.text)
answer_reasoning = answer_result.reasoning_content
Expand Down
Loading