Find answers from the community

Home
Members
dagthomas
d
dagthomas
Offline, last seen 2 months ago
Joined September 25, 2024
Has anyone been successful in creating a docker version of qdrant on azure cloud?

Im having issues with it. Everything works in local docker compose, but I can't get it working in azure.
1 comment
d
I have no idea what I am doing; But I am trying to upload a file from nodejs to python fastapi, and create a qdrant index of it and place it in qdrant. And query the index and return an answer.

But it only returns -1 for the query.

I am using docker compose, and I figure I have loads of errors and it cant connect to qdrant or something like that. If anyone wants to take a glance.
Plain Text
import qdrant_client
client = qdrant_client.QdrantClient(
    host="qdrant"  # qdrant is the name of the docker container
)

@app.post("/upload")
async def upload_file(file: UploadFile = File(...)):
    uniqueid = uuid.uuid4()
    os.makedirs(f"files/{uniqueid}/", exist_ok=True)
    file_location = f"files/{uniqueid}/{file.filename}"
    with open(file_location, "wb+") as file_object:
        file_object.write(file.file.read())
    documents = SimpleDirectoryReader(f"files/{uniqueid}/").load_data()
    print(documents)
    index = GPTQdrantIndex(documents, collection_name=uniqueid, client=client)
    response = index.query(
        "Jeg har lyst til å dra på ferie, kan jeg bruke firmahyttene?")
    shutil.rmtree(f"files/{uniqueid}/")
    return {"info": f"file '{file.filename}' successully indexed in Qdrant", "data":  response}


Plain Text
version: "3.8"
networks:
  app-tier:
    driver: bridge
services:
  fastapi:
    build: ./fastapi
    expose:
      - "5000"
    ports:
      - "5000:5000"  
    environment:
      - QDRANT_HOST=qdrant
    depends_on:
      - qdrant  
    networks:
      - app-tier   
    volumes:
      - ./fastapi:/app:Z
  sveltekit:
    build: ./sveltekit
    ports:
      - 3000:3000    
    networks:
      - app-tier    
    depends_on:
      - fastapi
    volumes:
      - ./sveltekit:/app:Z
    environment:
      - VITE_BACKEND_URL=http://localhost:5000
  qdrant:
    image: qdrant/qdrant:v0.10.1
    #    mem_limit: 450m
    ports:
      - 6333:6333
    volumes:
      - ./data/qdrant_storage:/qdrant/storage

    networks:
      - app-tier 
49 comments
L
.
d
@Logan M How is Flask vs FastApi? I have no experience with Python, but I started with FastApi and have moved to Gunicorn, Uvicorn, FastApi docker compose. Is Flask a better choice?
8 comments
R
d
L
This is not Llama_index specific, but suddenly getting error on query - Open AI has some errors?

Plain Text
uvicorngunicornfastapisveltekit-fastapi-1    | INFO:openai:error_code=internal_error error_message='Internal server error' error_param=None error_type=auth_subrequest_error message='OpenAI API error received' stream_error=False
uvicorngunicornfastapisveltekit-fastapi-1    | WARNING:langchain.llms.openai:Retrying langchain.llms.openai.completion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it raised APIError: Internal server error {
uvicorngunicornfastapisveltekit-fastapi-1    |     "error": {
uvicorngunicornfastapisveltekit-fastapi-1    |         "message": "Internal server error",
uvicorngunicornfastapisveltekit-fastapi-1    |         "type": "auth_subrequest_error",
uvicorngunicornfastapisveltekit-fastapi-1    |         "param": null,
uvicorngunicornfastapisveltekit-fastapi-1    |         "code": "internal_error"
uvicorngunicornfastapisveltekit-fastapi-1    |     }
uvicorngunicornfastapisveltekit-fastapi-1    | }
uvicorngunicornfastapisveltekit-fastapi-1    |  500 {'error': {'message': 'Internal server error', 'type': 'auth_subrequest_error', 'param': None, 'code': 'internal_error'}} {'Date': 'Tue, 07 Mar 2023 11:48:28 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '166', 'Connection': 'keep-alive', 'Vary': 'Origin', 'X-Request-Id': '1f00430b867966779b7ef6942e4460ba', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains'}.
7 comments
d
j
a
Is it possible to fine-tune indexes?+ with given prompts?
10 comments
d
o
j
Im also getting far worse results from querying now, I did some indexing and tests in version 0.3.2 with the state davinci 3 was in then, and the results are far wors when I try to make it better, today @holodeck dunno why
16 comments
h
S
j
d