minor refactor
Browse files
src/know_lang_bot/chat_bot/chat_graph.py
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
-
from __future__ import annotations
|
2 |
from dataclasses import dataclass
|
3 |
from typing import List, Dict, Any, Optional
|
4 |
import chromadb
|
5 |
from pydantic import BaseModel
|
6 |
from pydantic_graph import BaseNode, Graph, GraphRunContext, End
|
7 |
import ollama
|
8 |
-
import
|
9 |
-
from know_lang_bot.chat_bot.chat_config import ChatAppConfig, chat_app_config
|
10 |
from know_lang_bot.utils.fancy_log import FancyLogger
|
11 |
from pydantic_ai import Agent
|
12 |
|
@@ -24,9 +22,6 @@ class ChatResult(BaseModel):
|
|
24 |
answer: str
|
25 |
references_md: Optional[str] = None
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
@dataclass
|
31 |
class ChatGraphState:
|
32 |
"""State maintained throughout the graph execution"""
|
|
|
|
|
1 |
from dataclasses import dataclass
|
2 |
from typing import List, Dict, Any, Optional
|
3 |
import chromadb
|
4 |
from pydantic import BaseModel
|
5 |
from pydantic_graph import BaseNode, Graph, GraphRunContext, End
|
6 |
import ollama
|
7 |
+
from know_lang_bot.chat_bot.chat_config import ChatAppConfig
|
|
|
8 |
from know_lang_bot.utils.fancy_log import FancyLogger
|
9 |
from pydantic_ai import Agent
|
10 |
|
|
|
22 |
answer: str
|
23 |
references_md: Optional[str] = None
|
24 |
|
|
|
|
|
|
|
25 |
@dataclass
|
26 |
class ChatGraphState:
|
27 |
"""State maintained throughout the graph execution"""
|