Files
Anton_wireframe/app/services/__pycache__/langgraph_agent.cpython-312.pyc
T

40 lines
7.1 KiB
Plaintext
Raw Normal View History

Ë
Æ
³hàãó¦ddlmZddlmZmZmZmZddlZddlm Z m
Z
m Z ddl m
Z
mZddlmZddlmZddlmZmZGd „d
e
«ZGd d «Zy)
é)Ú annotations)ÚAnyÚDictÚListÚOptionalN)ÚENDÚSTARTÚ
StateGraph)Ú BaseModelÚField)Úfunc)Ú
InvestorTable)Ú
QueryResponseÚQueryResponseListcóPeZdZUded<ee¬«Zded<ee¬«Zded<y)Ú
AgentStateÚstrÚquestion)Údefault_factoryzList[QueryResponse]Ú sql_resultsÚvector_resultsN)Ú__name__Ú
__module__Ú __qualname__Ú__annotations__r Úlistrr©óúS/home/oluwasanmi/Documents/Work/MKD/anton_wireframe/app/services/langgraph_agent.pyrrs'؃MÙ',¸TÔ'B€KÐBÙ*/ÀÔ*E€NÐErrcóHeZdZdZ d d dZd
dZd
dZd
dZd dZy) ÚLangGraphQueryAgentzKSimple LangGraph agent that queries both SQL and Chroma and merges results.NcóT||_|xstjd¬«|_|jj dddi¬«|_t
t«}|jd|j«|jd|j«|jd |j«|jtd«|jtd«|jdd «|jdd «|jd t«|j«|_y)
Nz ./chroma_db)ÚpathÚinvestor_descriptionsÚ descriptionz1Investor descriptions and investment thesis focus)ÚnameÚmetadataÚ
sql_searchÚ
vector_searchÚmerge)Ú sql_sessionÚchromadbÚPersistentClientÚvector_db_clientÚget_or_create_collectionÚ
collectionr
rÚadd_nodeÚ _sql_searchÚ_vector_searchÚ_mergeÚadd_edger rÚcompileÚapp)Úselfr+r.Úgraphs rÚ__init__zLangGraphQueryAgent.__init__ð
'ˆÔð!1ò!
´H×4MÑ4MØô5
ˆÔð×ÐðIó
ˆŒôœ:ÓØ
| T×%5Ñ%5Ô
¨×(;Ñ(;Ô
§ ¡ Ô ”u˜lÔ
”u˜
| 
¨Ô
Ô—=‘=“?ˆrcóg}|jd|iS|jjt«jt j
tj «jd|jj «d«t j
tj«jd|jj «d«zt j
tj«jd|jj «d«zt j
tj«jd|jj «d«z«jd«}|j«D]a}|jt|j |j |j"|j|j|jddd¬« «Œcd|iS)Nrú
ÚzMatched SQL fields via LIKE© r&ÚaumÚ