minor refactor
Browse files
src/know_lang_bot/chat_bot/chat_graph.py
CHANGED
@@ -51,9 +51,9 @@ class PolishQuestionNode(BaseNode[ChatGraphState, ChatGraphDeps, ChatResult]):
|
|
51 |
|
52 |
async def run(self, ctx: GraphRunContext[ChatGraphState, ChatGraphDeps]) -> RetrieveContextNode:
|
53 |
# Create an agent for question polishing
|
54 |
-
from pydantic_ai import Agent
|
55 |
polish_agent = Agent(
|
56 |
-
f"{ctx.deps.config.llm.model_provider}:{ctx.deps.config.llm.model_name}"
|
|
|
57 |
)
|
58 |
prompt = f"""
|
59 |
Original question: {ctx.state.original_question}
|
|
|
51 |
|
52 |
async def run(self, ctx: GraphRunContext[ChatGraphState, ChatGraphDeps]) -> RetrieveContextNode:
|
53 |
# Create an agent for question polishing
|
|
|
54 |
polish_agent = Agent(
|
55 |
+
f"{ctx.deps.config.llm.model_provider}:{ctx.deps.config.llm.model_name}",
|
56 |
+
system_prompt=self.system_prompt
|
57 |
)
|
58 |
prompt = f"""
|
59 |
Original question: {ctx.state.original_question}
|