Orama as an Answer Engine
With Orama 3.0, we introduced a new feature called AnswerSession that allows you to perform ChatGPT-like experiences on your website.
It uses a free feature from Orama Cloud called Secure Proxy to proxy your queries to the OpenAI API, so you don’t need to worry about sharing the API key on the client-side.
The APIs are designed to be as close as possible to the Orama Cloud APIs, so you can easily migrate your projects from Orama Cloud to Orama Open Source and vice-versa.
Getting Started
Orama implements a full-text, vector, and hybrid search engine as well as a complete RAG (Retrieval-Augmented Generation) pipeline to generate answers from your documents. All with minimum dependencies and configuration, so you can focus on building your project.
To get started, you will need to create an account on Orama Cloud and generate an API key from the “Secure Proxy” section. Then, you can use the API key to create an AnswerSession and start generating answers.
Follow this guide to get your API key for free and start using the AnswerSession APIs!
AnswerSession
Creating an answer session is as simple as:
The onStateChange: console.log
event will log the state of the session, allowing you to reactively update your UI based on the current state of the session.
In the example above, the onStateChange
will be triggered for every new object in the following array (the state
):