File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -779,8 +779,8 @@ async def aquery( # noqa: PLR0912
779
779
else :
780
780
with set_llm_session_ids (session .id ):
781
781
prior_answer_prompt = ""
782
- if prompt_config .iteration_prompt and session .answer :
783
- prior_answer_prompt = prompt_config .iteration_prompt .format (
782
+ if prompt_config .answer_iteration_prompt and session .answer :
783
+ prior_answer_prompt = prompt_config .answer_iteration_prompt .format (
784
784
prior_answer = session .answer
785
785
)
786
786
messages = [
Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ class PromptSettings(BaseModel):
266
266
267
267
summary : str = summary_prompt
268
268
qa : str = qa_prompt
269
- iteration_prompt : str | None = Field (
269
+ answer_iteration_prompt : str | None = Field (
270
270
default = answer_iteration_prompt_template ,
271
271
description = (
272
272
"Prompt to inject existing prior answers into the qa prompt to allow the model to iterate. "
Original file line number Diff line number Diff line change @@ -539,7 +539,7 @@ def test_location_awareness(docs_fixture) -> None:
539
539
540
540
541
541
def test_query (docs_fixture ) -> None :
542
- settings = Settings (prompts = {"iteration_prompt " : None })
542
+ settings = Settings (prompts = {"answer_iteration_prompt " : None })
543
543
docs_fixture .query ("Is XAI usable in chemistry?" , settings = settings )
544
544
545
545
@@ -559,7 +559,7 @@ def test_query_with_iteration(docs_fixture) -> None:
559
559
), "prior answer not in prompt"
560
560
# run without a prior session to check that the flow works correctly
561
561
docs_fixture .query (question , llm_model = llm , settings = settings )
562
- assert settings .prompts .iteration_prompt [:10 ] not in cast ( # type: ignore[index]
562
+ assert settings .prompts .answer_iteration_prompt [:10 ] not in cast ( # type: ignore[index]
563
563
"str" , my_results [- 1 ].prompt [1 ].content # type: ignore[union-attr, index]
564
564
), "prior answer prompt should not be inserted"
565
565
You can’t perform that action at this time.
0 commit comments