SkywardAI / voyager

The project is OpenAI-like API service of SkywardAI ecosystem
Apache License 2.0
1 stars 6 forks source link

[Bug]: RAG inference context null #62

Closed Murkeee closed 1 month ago

Murkeee commented 1 month ago

Contact Details(optional)

No response

What happened?

When making request to inference API for RAG completion the context is always null.

Version

v0.2.1

Relevant log output

[nodemon] starting `node --disable-warning=ExperimentalWarning index.js`
VOYAGER is running on port 8000, happy sailing!
file:///app/actions/inference.js:227
        { role: "system", content: `This background information is useful for your next answer: "${rag_result.context}"` }
                                                                                                              ^

TypeError: Cannot read properties of null (reading 'context')
    at ragChatCompletion (file:///app/actions/inference.js:227:111)

Node.js v20.15.1
Murkeee commented 1 month ago

@cbh778899 @Aisuko

cbh778899 commented 1 month ago

In the latest version, you should load the dataset first using POST /v1/embeddings/dataset and call the rag engine with the loaded dataset name. Still, I'll add validation on null values later.

Aisuko commented 1 month ago

@cbh778899 Do we have some demo for how to load dataset? like video, or test case? If not, may you create an issue for it?

cbh778899 commented 1 month ago

just run the try it out in swagger docs can load the dataset, the variables are written there

Aisuko commented 1 month ago

Here is the new video https://github.com/SkywardAI/voyager?tab=readme-ov-file#setup-and-api-usage-demo-video and it includes how to load the data from Swagger cc @Murkeee