Giter VIP home page Giter VIP logo

arxiv-bot's People

Contributors

jamescalam avatar willsmithorg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arxiv-bot's Issues

tools key unavailable with Chroma Vectordb

   def _init_memory(
    self,
    index_name: str = "arxiv-bot",
    pinecone_api_key: Optional[str] = None,
    pinecone_environment: Optional[str] = None,
    openai_api_key: Optional[str] = None
):
   ##### Vector store
    self.vectordb = Chroma.from_documents(self.doc_texts, OpenAIEmbeddings(openai_api_key=openai_api_key))

    # initialize retriever
    self.retriever = langchain.chains.RetrievalQAWithSourcesChain.from_chain_type(
        llm=self.llm,
        chain_type='stuff',
        retriever=self.vectordb.as_retriever()
    )
    # initialize search tool
    arxiv_db_tool = langchain.agents.Tool(
        func=self._search_arxiv_db,
        description=self.search_description,
        name="Search ArXiv DB"
    )
    # append to tools list
    self.tools.append(arxiv_db_tool)

Exception log:
File "/Users/Test/Desktop/sailgpt/gptagent.py", line 143, in _init_chatbot
self.agent = langchain.agents.initialize_agent(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/langchain/agents/initialize.py", line 64, in initialize_agent
return AgentExecutor.from_agent_and_tools(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/langchain/agents/agent.py", line 557, in from_agent_and_tools
return cls(
File "pydantic/main.py", line 339, in pydantic.main.BaseModel.init
File "pydantic/main.py", line 1064, in pydantic.main.validate_model
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/langchain/agents/agent.py", line 565, in validate_tools
tools = values["tools"]
KeyError: 'tools'

KeyError: 'tools' even with default pinecone as vectordb

Traceback (most recent call last):
File "/Volumes/Data/arxiv-bot-main/botsy.py", line 5, in
bot = arxiv_bot.manager.bots.Arxiver(
File "/Volumes/Data/arxiv-bot-main/arxiv_bot/manager/bots.py", line 106, in init
self._init_chatbot(verbose=verbose)
File "/Volumes/Data/arxiv-bot-main/arxiv_bot/manager/bots.py", line 187, in _init_chatbot
self.agent = langchain.agents.initialize_agent(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/langchain/agents/initialize.py", line 64, in initialize_agent
return AgentExecutor.from_agent_and_tools(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/langchain/agents/agent.py", line 587, in from_agent_and_tools
return cls(
File "pydantic/main.py", line 339, in pydantic.main.BaseModel.init
File "pydantic/main.py", line 1064, in pydantic.main.validate_model
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/langchain/agents/agent.py", line 595, in validate_tools
tools = values["tools"]
KeyError: 'tools'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.