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

lightrag_openai_compatible_demo. file. Questions to ask #121

Closed
redpintings opened this issue Oct 25, 2024 · 1 comment
Closed

lightrag_openai_compatible_demo. file. Questions to ask #121

redpintings opened this issue Oct 25, 2024 · 1 comment

Comments

@redpintings
Copy link

I saw that you modified the code yesterday, but I feel that there are some areas that are not correct, especially the file reading and querying parts of the asynchronous code. Would it be better to switch to asynchronous?

with open("./hanye.txt", "r", encoding="utf-8") as f: content = f.read() await rag.ainsert(content)

naive_result = await rag.aquery(query, param=QueryParam(mode="naive")) print("Naive search result:", naive_result)

@Dormiveglia-elf
Copy link
Contributor

Dormiveglia-elf commented Oct 25, 2024

You are right. I tested it and it is better. I have put a new PR #168 to do this.

@LarFii LarFii closed this as completed Nov 1, 2024
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

3 participants