Find answers from the community

Updated 4 months ago

@Logan M @WhiteFang_Jr any good examples

At a glance
any good examples for routing data to sql db including chat, tables... and routing embeddings to Vector DB?
L
a
7 comments
I'm not sure what you mean? Using an agent or selector is probably the easiest choice
So i have chroma service.... now i want to integrate in this agent
Plain Text
class Agent:
    name: str
    __agent: OpenAIAgent

    def __init__(
            self,
            name: str,
            functions: List[Callable],
            host="0.0.0.0",
            port=8000,
            instruction="",
            db_url="sqlite+aiosqlite:///hive_agent.db"
            vector_db: ????
            
    ):self.name = name
        self.functions = functions
        self.host = host
        self.port = port
        self.app = FastAPI()
        self.shutdown_event = asyncio.Event()
        self.instruction = instruction

        self.__setup(db_url)
where chats are routed to sqlite+aiosqlite:///hive_agent.db and embeddings to VDB? @Logan M .. Please let me know if it clarifies my question. Here is agent code for reference? https://github.com/hivenetwork-ai/hive-agent-py/tree/main/hive_agent. My function for Chroma service is something like from β€œaa import Chromaservice β€œ
@Logan M @WhiteFang_Jr let me know if you need any further info
Looking forward to hearing from you
I'm sorry but I'm not reading a repo of code πŸ˜… we have many examples of using chroma in our docs
No need to read the repo, just for your reference. was looking for some prod code for agents and Chromadb or any other vectordb, i have seen alot of notebooks in your docs(https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/vector_stores/llama-index-vector-stores-chroma/llama_index/vector_stores/chroma/base.py) but no code sample similar too...
Plain Text
class Agent:
    name: str
    __agent: OpenAIAgent

    def __init__(
            self,
            name: str,
            functions: List[Callable],
            host="0.0.0.0",
            port=8000,
            instruction="",
            db_url="sqlite+aiosqlite:///hive_agent.db"
            vector_db: ????
            
    ):self.name = name
        self.functions = functions
        self.host = host
        self.port = port
        self.app = FastAPI()
        self.shutdown_event = asyncio.Event()
        self.instruction = instruction

        self.__setup(db_url)
@Logan M if you can direct me to something similar, would be really appreciated
Add a reply
Sign up and join the conversation on Discord