Skip to content

neoguojing/agi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agi

langchain based agi

RAG

  • history_chain = RunnableLambda(self._enter_history, self._aenter_history).with_config(run_name="load_history")
  • history_chain = RunnablePassthrough.assign(**{"chat_history": history_chain}).with_config(run_name="insert_history")
  • retrieval_docs = (lambda x: x["input"]) | retriever
  • retriever = (lambda x: x["input"]) | retriever or prompt | llm | StrOutputParser() | retriever, run_name="chat_retriever_chain"
  • context=retrieval_docs.with_config(run_name="retrieve_documents")
  • "context": format_docs run_name="format_inputs"
  • answer = "context" | prompt | llm | _output_parser run_name="stuff_documents_chain"

About

langchain based agi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published