Find answers from the community

Updated 2 years ago

Building index

At a glance

The community member who posted the original question is unsure if building an index for their new OpenAPI account requires using the OpenAPI API, or if it can be done locally. The first commenter confirms that for vector indexes, the system calls OpenAI to embed the documents, and suggests the issue may be due to the user not having payment information on their account.

The original poster then replies that they tested a document and it cost $10, which is too expensive for the index building process. They are wondering if offline index building is possible to solve the cost issue. Another commenter notes that the cost seems high, as the text-ada-002 model is $0.0004 per 1k tokens, implying the index must have been very large.

The final commenter provides an answer, stating that the community member can build vector indexes offline by using local embeddings, if their computer is capable of running the embeddings. They provide a link to the relevant documentation.

Useful resources
This is a new OpenApi account, building the index needs OpenApi api? it's not locally?
L
h
4 comments
Yea, for vector indexes it calls openai to embed your documents.

Normally I see that error if someone doesn't have payment info on their account. πŸ€”
Thank you for your reply. I tested a document and it cost $10. The process of building an index is too expensive, so I was thinking that if offline index building is possible, it would solve the cost issue.
$10 to construct a vector index?

text-ada-002 is $0.0004/1k tokens. That must have been a huuuuge index
You can build vector indexes offline by using local embeddings (if you computer can run the embeddings - it should be able to)

https://gpt-index.readthedocs.io/en/latest/how_to/customization/embeddings.html#custom-embeddings
Add a reply
Sign up and join the conversation on Discord