You might need to cast the response as a string in the return? Not sure with FastAPI
You might also want to check if the client object has some sort of connection Check function that you can log the result of
Think there might be some async issues or something, doesn't work making a simple vector index either, so think I'll try pulling generation out in its own function.
I wonder if fastAPI is timing out the function? It's a little weird it used the 204 response code (then again, not 100% sure how fast api decides the code lol)
If I remove the index part it's really fast, and documents work. In the instant I introduce index, it halts, gotta get the kids to bed and grind further π
Haha nice, narrowed it down! πͺ
@Logan M Oki, it looks like it worked when I created a new async function for the ingestion part, weird π no idea how Python works, all new to me ^^
Haha I'm a little unfamiliar with pythons async stuff too, very weird. Glad it works! π
So this, worked. Oh well, lets get qdrant working ^^
Yeah, everything worked out smoothly with qdrant after that. It also looked like the answer was alot better from qdrant than from simplevector, how about that
Ahhh nice! I'm guess qdrant might be using some different techniques for similarity matching? π
Its werid, i get a slightly different answer each upload. Even tho temp i 0 - so there is some magic going on there
And the 204 response was stupid, that was not from fastapi, but me trying to return bogus data in sveltekit π
I have a server side action that posts to fastapi, and it returns the backend data to front-end. And I forgot to do "await return.json()" and just did return π
Ohhhh that makes sense! Good catch!
next issue, how do I query with vectors, thats a big WTF with the QdrantReader π
To get the index from the qdrant db, query vectors
Yeah, I just thought I could get the data straight from the qdrant db and not have to save and load from file. Because this would just be the same as doing simple vector?
You can save and load still, but it's saving much less info.
When you load, just pass it an empty array instead of your documents, along with the qdrant info
Then it makes sense π tnx for info!
First query after index is good, when I reload the index, I get some weird answers, like major hallucinations.
Hallucinations with the same query?
Maybe check response.source_nodes to make sure it's actually using the qdrant index
@Logan M Yeah, thans for that!
Doesn't look quite right π
Uh oh haha π
that looks like a text encoding issue somehow
My guess is qdrant is encoding with something other than utf8? π€
I found the issue - it was my lumpy fingers. I cleaned the filename and it was name-pdf so it didnt understand it was a pdf and parsed it as a binary file π
But atleast I am here now! So now I can get working ^^
Tnx for putting me in the right direction ^^
my cleaned vs not file π
That's what I get for not knowing enough python ^^
Still gives bad answers tho, maybe I have to add some gpt-4 magic to the mix
Glad it's working at least! πͺπͺ
Yeah, its getting there ^^
Thinking Ill release an open sournce full working stack of Gunicorn, Uvicorn, Fastapi, Qdrant, Sveltekit, Docker compose when I get it up and running ^^
Nice, do it! That would be an awesome resource.
If you want, you could add it to the starter pack (currently at 82 stars π)
Totally cool if not though!
Maybe better, I am bad at facilitating that stuff anyways ^^ It has more stars than my top github project ^^
Jerry has (kindly) tweeted out the repo out a few times, which helps with the getting it noticed haha
I'm sure he can give you a shout out too for contributing it πͺ
Yeah, thats pretty nice π
@dagthomas did you get uvicorn playing nice w/ llamaindex? I seem to be playing whackamole between the different components from llamaindex when using uvloop
I think it's pretty difficult to use uvloop. I always set the loop type to be asyncio when using fastapi
maybe someday nest_asyncio() will support uvloop :PSadge: