GithubHelp home page GithubHelp logo

bondai's People

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  avatar  avatar

bondai's Issues

Error: Unable to install

Was planning to try out the package but it just doesn't install using the command.

pip install bondai

This returns a numpy version error. Fixed that by removing the specific version in the requirements.txt but then it returned a pre-commit version error. Did the same here and got another couple of errors but it showed the message that the package was installed successfully. However when trying to run the toy example from the docs, it returns the error: " No module named bondai".

google.search.py error

Using the google_search tool
Thought: By using this query, I aim to find search results that might contain a direct URL to John McCarthy's photo on the Stanford website.
Arguments
query: John McCarthy photo site:jmc.stanford.edu
count: 20
page: 1
An Error occured: <HttpError 400 when requesting https://customsearch.googleapis.com/customsearch/v1?q=John+McCarthy+photo+site%3Ajmc.stanford.edu&cx=500b5dd06afd248bb&start=0&num=20&key=AIzaSyAwHX-cA2ql81tbyczUAYAMajNe3qQ_vGA&alt=json returned "Request contains an invalid argument.". Details: "[{'message': 'Request contains an invalid argument.', 'domain': 'global', 'reason': 'badRequest'}]">

URL:
https://customsearch.googleapis.com/customsearch/v1?q=John+McCarthy+photo+site%3Ajmc.stanford.edu&cx=500b5dd06afd248bb&start=0&num=20&key=AIzaSyAwHX-cA2ql81tbyczUAYAMajNe3qQ_vGA&alt=json

Error:

{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "errors": [
      {
        "message": "Request contains an invalid argument.",
        "domain": "global",
        "reason": "badRequest"
      }
    ],
    "status": "INVALID_ARGUMENT"
  }
}

If you change num=20 in the URL to a number less than 5 it works.

https://customsearch.googleapis.com/customsearch/v1?q=John+McCarthy+photo+site%3Ajmc.stanford.edu&cx=500b5dd06afd248bb&start=0&num=4&key=AIzaSyAwHX-cA2ql81tbyczUAYAMajNe3qQ_vGA&alt=json

E.G:

{
  "kind": "customsearch#search",
  "url": {
    "type": "application/json",
    "template": "https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&c2coff={disableCnTwTranslation?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&linkSite={linkSite?}&orTerms={orTerms?}&relatedSite={relatedSite?}&dateRestrict={dateRestrict?}&lowRange={lowRange?}&highRange={highRange?}&searchType={searchType}&fileType={fileType?}&rights={rights?}&imgSize={imgSize?}&imgType={imgType?}&imgColorType={imgColorType?}&imgDominantColor={imgDominantColor?}&alt=json"
  },
  "queries": {
    "request": [
      {
        "title": "Google Custom Search - John McCarthy photo",
        "totalResults": "49000000",
        "searchTerms": "John McCarthy photo",
        "count": 4,
        "startIndex": 1,
        "inputEncoding": "utf8",
        "outputEncoding": "utf8",
        "safe": "off",
        "cx": "500b5dd06afd248bb"
      }
    ],
    "nextPage": [
      {
        "title": "Google Custom Search - John McCarthy photo",
        "totalResults": "49000000",
        "searchTerms": "John McCarthy photo",
        "count": 4,
        "startIndex": 5,
        "inputEncoding": "utf8",
        "outputEncoding": "utf8",
        "safe": "off",
        "cx": "500b5dd06afd248bb"
      }
    ]
  },
  "context": {
    "title": "Aura"
  },
  "searchInformation": {
    "searchTime": 0.219098,
    "formattedSearchTime": "0.22",
    "totalResults": "49000000",
    "formattedTotalResults": "49,000,000"
  },
  "items": [
    {
      "kind": "customsearch#result",
      "title": "jon-mccarthy-photo Jon McCarthy Photo",
      "htmlTitle": "<b>jon</b>-<b>mccarthy</b>-<b>photo Jon McCarthy Photo</b>",
      "link": "https://www.jonmccarthyphoto.com/",
      "displayLink": "www.jonmccarthyphoto.com",
      "snippet": "Portfolio- AT THE SHOW AT THE FARM IN THE PRESS -2023 Shows- -2022 Shows- INSTAGRAM | FACEBOOK.",
      "htmlSnippet": "Portfolio- AT THE SHOW AT THE FARM IN THE PRESS -2023 Shows- -2022 Shows- INSTAGRAM | FACEBOOK.",
      "cacheId": "szssU1TA40YJ",
      // etc

ImportError: cannot import name 'MemoryManager' from partially initialized module 'bondai.memory'

Hello,

I've seen such errors before when the filename is the same as the package name, however, I was just testing the InMemoryArchivalMemoryDataSource functionality using the example given in the documentation. Please can you give suggestions on how to resolve this?

playground.py:

import os
key = os.environ["OPENAI_API_KEY"] 

from bondai.memory.archival.datasources import InMemoryArchivalMemoryDataSource
from bondai.models.openai import OpenAIEmbeddingModel, OpenAIModelNames

# Initialize an In-Memory Archival Memory Data Source
in_memory_archival = InMemoryArchivalMemoryDataSource(
    embedding_model=OpenAIEmbeddingModel(OpenAIModelNames.TEXT_EMBEDDING_ADA_002)
)

# Insert and search content
in_memory_archival.insert("Temporary archival data")
results = in_memory_archival.search("archival data")
print(results)

Error:

  File "/Users/username/project/bondai_trial/playground.py", line 4, in <module>
    from bondai.memory.archival.datasources import InMemoryArchivalMemoryDataSource
  File "/Users/username/merck project/bondai_trial/trial_venv/lib/python3.11/site-packages/bondai/memory/__init__.py", line 1, in <module>
    from .memory_manager import (
  File "/Users/username/project/bondai_trial/trial_venv/lib/python3.11/site-packages/bondai/memory/memory_manager.py", line 10, in <module>
    from .conversation.datasources import (
  File "/Users/username/project/bondai_trial/trial_venv/lib/python3.11/site-packages/bondai/memory/conversation/__init__.py", line 1, in <module>
    from .datasources import (
  File "/Users/username/project/bondai_trial/trial_venv/lib/python3.11/site-packages/bondai/memory/conversation/datasources.py", line 6, in <module>
    from bondai.agents.messages import (
  File "/Users/username/project/bondai_trial/trial_venv/lib/python3.11/site-packages/bondai/agents/__init__.py", line 1, in <module>
    from .conversational_agent import ConversationalAgent
  File "/Users/username/project/bondai_trial/trial_venv/lib/python3.11/site-packages/bondai/agents/conversational_agent.py", line 8, in <module>
    from bondai.memory import MemoryManager
ImportError: cannot import name 'MemoryManager' from partially initialized module 'bondai.memory' (most likely due to a circular import) (/Users/username/project/bondai_trial/trial_venv/lib/python3.11/site-packages/bondai/memory/__init__.py)

File structure:

   |- trial_env
  |- playground.py

Here, trial_env is my virtual environment

Fork Chatflow and make it into an UI for bondai

It's a good idea, this could be pretty fun. Well I'd love someone that is able to run a fork off this, I put a lot of hours into this and the senior dev doesn't have the time, so if there was an active fork of this I could split my time and it be better for everyone because it rushes him less. I'm obsessed with this currently. Hop on our discord btw https://discord.gg/QeNgRqFz

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.