Skip to content

Commit

Permalink
Add citation pipeline to exercise_chat
Browse files Browse the repository at this point in the history
  • Loading branch information
cremertim committed Feb 1, 2025
1 parent eb7faf8 commit 6516821
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/pipeline/chat/exercise_chat_agent_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
tell_progress_stalled_system_prompt,
)

from ..shared.citation_pipeline import CitationPipeline
from ..shared.citation_pipeline import CitationPipeline, InformationType
from ..shared.reranker_pipeline import RerankerPipeline
from ..shared.utils import generate_structured_tools_from_functions
from ...common.PipelineEnum import PipelineEnum
Expand Down Expand Up @@ -585,6 +585,15 @@ def faq_content_retrieval() -> str:
print("NEW RESPONSE: " + out)
print("Response is rewritten.")

if self.retrieved_faqs:
self.callback.in_progress("Augmenting response ...")
out = self.citation_pipeline(
self.retrieved_faqs,
out,
InformationType.FAQS,
base_url=dto.settings.artemis_base_url,
)

self.callback.done(
"Response created", final_result=out, tokens=self.tokens
)
Expand Down

0 comments on commit 6516821

Please sign in to comment.