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

[Feature] Connect bot to data source #17

Open
adbutler007 opened this issue Oct 31, 2023 · 7 comments
Open

[Feature] Connect bot to data source #17

adbutler007 opened this issue Oct 31, 2023 · 7 comments

Comments

@adbutler007
Copy link

It seems intuitive that, once a user creates a data source, he should be able to query it somehow. It would be great if there were a field in the 'create bot' window to connect the bot to an existing data source.

It's entirely possible I'm missing something, but I can't see how to make that connection at the moment.

Thank you very much,
Adam

@talvola
Copy link

talvola commented Oct 31, 2023

just adding onto this - maybe it's just instructions, but I have built indexes already from my in-house Jira and Confluence pages, and wanted to just hook them up to the chat. That would be ideal as a first step - even better allow the various Llama Hub connectors to be added in.

@marcusschiesser
Copy link
Collaborator

@adbutler007 currently there's no UI for changing the data source of a bot, meanwhile you'll have to modify the JSON of the bot to add a datasource as described in https://github.com/run-llama/chat-llamaindex#-data-sources

@adbutler007
Copy link
Author

Is the app built to take multiple pdf files in a datasources directory? Or must each directory take just one pdf file?

@marcusschiesser
Copy link
Collaborator

@adbutler007 you can use multiple PDFs in the same directory, as it's using the SimpleDirectoryReader in the generate.mjs script, see:

const documents = await new SimpleDirectoryReader().loadData({
directoryPath: `${DATASOURCES_DIR}/${datasource}`,
});

@mourrr
Copy link

mourrr commented Nov 23, 2023

@adbutler007 currently there's no UI for changing the data source of a bot, meanwhile you'll have to modify the JSON of the bot to add a datasource as described in https://github.com/run-llama/chat-llamaindex#-data-sources

it's not clear to me how bots created in the UI are added to the bot.data.ts file (to then subsequently be linked to the datasource as per above). Does one need to modify the bot.data.ts to create a bot and mirror that in the UI or vice versa. which wouldn't make sense isn't it? I think I think I am missing something 🧐... @marcusschiesser can you pls advise? thanks 🙏
ps. from my experience, adding a bot in the ui is not mirrored in bot.data.ts . maybe it's a bug?

@marcusschiesser
Copy link
Collaborator

@mourrr The bots are stored in localStorage. If it is empty, the data in bot.data.ts is copied as a template. So you have to clear localStorage; see https://github.com/run-llama/chat-llamaindex#-data-sources

@54188wxp
Copy link

本人不是很懂该如何在 UI 中创建的机器人添加到 bot.data.ts 文件中,可以给一个详细操作步骤吗。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants