OpenAI Assistants #282
-
I want to give my agent access to pdf files for knowledge. The way I found to do this would be to use "assistants" from OpenAI. I did not see if there is a way to access them via langchain.dart. The "hacky" way I see to do this within the package right now would be to have the data available on the device in a .txt file. This has the disadvantage that 1. I only have access to the data from the time of compiling and 2. can't use pdfs, so I'd have to convert them to .txt files. So my questions are: Cheers :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @Jaaco! Thanks for your interest. There are not many options to extract text from PDFs reliably in Dart, unfortunately. Some people are using syncfusion_flutter_pdf, but the results are not great and you may need to buy a license depending on your needs. You can check this discussion in our Discord where we discussed this topic. Once you have the text, you can use LangChain.dart to embed the text, store it in a vector database, query it and augment it using an LLM (typical Retrieval Augmented Generation pipeline). Regarding OpenAI Assistants, I am planning to add support for it next week. I already updated our OpenAI client to support them, now I need to implement the agent that interacts with it. https://python.langchain.com/docs/modules/agents/agent_types/openai_assistants |
Beta Was this translation helpful? Give feedback.
Hey @Jaaco!
Thanks for your interest.
There are not many options to extract text from PDFs reliably in Dart, unfortunately. Some people are using syncfusion_flutter_pdf, but the results are not great and you may need to buy a license depending on your needs. You can check this discussion in our Discord where we discussed this topic.
Once you have the text, you can use LangChain.dart to embed the text, store it in a vector database, query it and augment it using an LLM (typical Retrieval Augmented Generation pipeline).
Regarding OpenAI Assistants, I am planning to add support for it next week. I already updated our OpenAI client to support them, now I need to implement the agent that inter…