Find answers from the community

Updated 5 months ago

When executing ...

At a glance

The community member is experiencing an issue when executing for doc in documents: index.insert(doc), where the code appears to be stuck and repeatedly retrying requests to the /chat/completions endpoint. The community members discuss the type of index being used (a vector store index with Weaviate), and try to understand why the code is calling the completion endpoint instead of the embeddings endpoint. They suggest checking the metadata extractor configuration and providing the full traceback, but the provided traceback is not helpful. The community members also discuss whether the code is running on a FastAPI server, but it is confirmed that it is not. Overall, the community is trying to understand the root cause of the issue and find a workaround, but there is no explicitly marked answer.

When executing ...
Plain Text
for doc in documents:
    index.insert(doc)

Why do we get stuck w/ ...
Plain Text
2024-01-11 22:49:04,713:INFO - Retrying request to /chat/completions in 0.974549 seconds
2024-01-11 22:49:04,714:INFO - Retrying request to /chat/completions in 0.958529 seconds
2024-01-11 22:50:05,681:INFO - Retrying request to /chat/completions in 1.951599 seconds
2024-01-11 22:50:05,695:INFO - Retrying request to /chat/completions in 1.896280 seconds

Is there any workaround for this?
L
M
17 comments
What kind of index are you using?
I'm using Weaviate at the moment (on free tier)
so a vector store index?
that's right
No idea why index.insert(doc) is calling the completion endpoint.... it should only be calling embeddings. Unless you have some metadata extractor configured somewhere
I do this before that document.metadata['link']
that's fine πŸ€”
If you ctrl+c while the above is printing, can you send the full traceback?
that would help narrow down where in the framework this is happening
here it is ...
dang, that wasn't as helpful as I wanted πŸ˜…
This is running on a fastapi server I'm guessing?
no it's not on fastapi
πŸ€” mmm what is going on there lol.

Ok, so if thats a dead end, still not sure why its calling the chat/completions endpoint.

Can you share how you setup the index? Did you set a specific embed_model?
just the usual way ... it does work occasionally ... btw, what's the problem w/ fastapi ?
nothing wrong with fastapi, just the threading/async stuff, and lack of proper traceback info, made me think it was running in fastapi
or at least behind some other service (flask, notebook, etc.)
Add a reply
Sign up and join the conversation on Discord