Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lancedb support #416

Closed
thinkall opened this issue Oct 25, 2023 · 7 comments
Closed

lancedb support #416

thinkall opened this issue Oct 25, 2023 · 7 comments
Labels
rag retrieve-augmented generative agents

Comments

@thinkall
Copy link
Collaborator

          @thinkall yes

its works but its always gives same output

from autogen.agentchat.contrib.retrieve_assistant_agent import RetrieveAssistantAgent
from autogen.agentchat.contrib.retrive_lancedb import LancedbRetrieveUserProxyAgent
from autogen.agentchat.contrib.retrive_lancedb import create_lancedb
autogen.ChatCompletion.start_logging()

# 1. create an RetrieveAssistantAgent instance named "assistant"
assistant = RetrieveAssistantAgent(
    name="assistant",
    system_message="You are a helpful assistant.",
    llm_config={
        "request_timeout": 600,
        "seed": 42,
        "config_list": config_list,
    },
)


ragproxyagent = LancedbRetrieveUserProxyAgent(
    name="ragproxyagent",
    human_input_mode="NEVER",
    max_consecutive_auto_reply=10,
    retrieve_config={
        "task": "qa",
        "docs_path": "https://raw.githubusercontent.com/microsoft/autogen/main/README.md",  # change this to your own path, such as https://raw.githubusercontent.com/microsoft/autogen/main/README.md
        "chunk_token_size": 2000,
        "client": "__",
        "embedding_model": "all-mpnet-base-v2",
    },
)


also im not user , adding 'client:'--' it is taking lancedb
? or should i need to define it again tere, also its not override any previous data thats reason i guess its always giving same output

i tried this way but working

table = db.open_table("my_table", mode="overwrite")

db = lancedb.connect('/tmp/lancedb')
table = db.create_table("pandas_docs", data=[
    {"vector": embeddings.embed_query("Hello World"), "text": "Hello World", "id": "1"}
], mode="overwrite")
docsearch = LanceDB.from_documents(documents, embeddings, connection=table)

image

Originally posted by @akashAD98 in #25 (comment)

@thinkall
Copy link
Collaborator Author

@akashAD98 let's discuss in this new thread rather than the closed one. I would suggest you read this https://github.com/microsoft/autogen/blob/main/autogen/agentchat/contrib/qdrant_retrieve_user_proxy_agent.py and implement the support for lancedb.

@akashAD98
Copy link

@thinkall okay thanks ill check it

@akashAD98
Copy link

i saw the repo, still im not sure why its not overwrite the existing data & use new data & there embeddings
every time getting same results

@akashAD98
Copy link

@thinkall can you give me some hints where its going wrong

@thinkall
Copy link
Collaborator Author

@thinkall can you give me some hints where its going wrong

The code in the test is just for demonstrating, in your case, you need to update the code. If you're just copying the code from the test file, it won't work.

@akashAD98
Copy link

okay

@AyushExel AyushExel mentioned this issue Nov 10, 2023
3 tasks
@thinkall
Copy link
Collaborator Author

Closing this issue due to inactivity. If you have further questions, please open a new issue or join the discussion in AutoGen Discord server: https://discord.com/invite/Yb5gwGVkE5

@thinkall thinkall added the rag retrieve-augmented generative agents label Jun 18, 2024
jackgerrits added a commit that referenced this issue Oct 2, 2024
* rename core module to base

* Rename agnext.core to agnext.base
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rag retrieve-augmented generative agents
Projects
None yet
Development

No branches or pull requests

2 participants