Open huicewang opened 7 months ago
Would love to see this as well to integrate this into existing websites / knowledge bases.
Similar to what Mintlify offers.
I was able to make a curl request based off of observing the api calls in the browser with dev tools. Get the token from the cookie in the request headers, I don't think it's valid for long though:
curl -X POST "https://danswer.example.com/api/chat/send-message" \
-H "Content-Type: application/json" \
-H "Cookie: fastapiusersauth=<your_token>" \
-d '{"chat_session_id":254,"parent_message_id":null,"message":"whats the company travel policy","prompt_id":0,"search_doc_ids":null,"retrieval_options":{"run_search":"auto","real_time":true,"filters":{"source_type":null,"document_set":null,"time_cutoff":null,"tags":[]}}}'
This is using Google SSO auth, you may be able to get a longer lived token with basic auth enabled
I'd also love to use DAnswer as the single source of indexed data, so I can build other LLM tools on top of it.
e.g., an API to search for and retrieve the text from documents matching a query (like happens on the RHS when it retrieves relevant documents). This way I can use the retrieved text in another LLM app.
Then, normal question/chat against any configured persona.
This would make the security around these integrated datasets a lot easier to manage, rather than having multiple disparate apps all separately indexing and storing the data.
+1
Any opinion as to the possibility of such feature ? It would be a real game changer for us
How to access DAnswer through an API interface?