sugarforever / chat-ollama

ChatOllama is an open source chatbot based on LLMs. It supports a wide range of language models, and knowledge base management.
MIT License
2.66k stars 417 forks source link

求助,使用milvus作为知识库创建时报错 #477

Open ghtwf01 opened 6 months ago

ghtwf01 commented 6 months ago

docker yml文件配置如下:

services:
  chromadb:
    image: chromadb/chroma
    ports:
      - "8000:8000"
    restart: always
    volumes:
      - chromadb_data:/chroma/.chroma/index

  chatollama:
    environment:
      - VECTOR_STORE=milvus
      - MILVUS_URL=http://host.docker.internal:19530
      - CHROMADB_URL=http://chromadb:8000
      - DATABASE_URL=file:/app/sqlite/chatollama.sqlite
      - REDIS_HOST=redis
      - COHERE_API_KEY=xxxxx
      - COHERE_MODEL=ms-marco-MiniLM-L-6-v2
      - COHERE_BASE_URL=http://peanutshell:8000/v1
    image: 0001coder/chatollama:latest
    pull_policy: always
    extra_hosts:
      - "host.docker.internal:host-gateway"
    ports:
      - "3000:3000"
    restart: always
    volumes:
      - ~/.chatollama:/app/sqlite

  redis:
    image: redis:latest
    restart: always
    volumes:
      - redis_data:/data/chatollama_redis

  peanutshell:
    image: ghcr.io/sugarforever/peanut-shell:latest
    volumes:
      - hf_data:/root/.cache

volumes:
  chromadb_data:
  redis_data:
  hf_data:

创建时报错:

chatollama-1   | Creating embeddings for Gemini model: embedding-001
chatollama-1   | Creating Milvus vector store
chatollama-1   | [nuxt] [request error] [unhandled] [500] unresolvable extensions: 'extend google.protobuf.FileOptions' in .milvus.proto.milvus
chatollama-1   |   at Root.resolveAll (./.output/server/node_modules/protobufjs/src/root.js:256:15)  
chatollama-1   |   at loadProtosWithOptionsSync (./.output/server/node_modules/@grpc/proto-loader/build/src/util.js:68:16)  
chatollama-1   |   at loadSync (./.output/server/node_modules/@grpc/proto-loader/build/src/index.js:197:61)  
chatollama-1   |   at getGRPCService (./.output/server/node_modules/@zilliz/milvus2-sdk-node/dist/milvus/utils/Grpc.js:28:59)  
chatollama-1   |   at MilvusClient.connect (./.output/server/node_modules/@zilliz/milvus2-sdk-node/dist/milvus/grpc/GrpcClient.js:28:54)  
chatollama-1   |   at new MilvusClient (./.output/server/node_modules/@zilliz/milvus2-sdk-node/dist/milvus/MilvusClient.js:50:14)  
chatollama-1   |   at new Milvus (./.output/server/node_modules/@langchain/community/dist/vectorstores/milvus.js:141:23)  
chatollama-1   |   at createMilvusVectorStore (./.output/server/chunks/_/index.mjs:471:10)  
chatollama-1   |   at createVectorStore (./.output/server/chunks/_/index.mjs:478:12)  
chatollama-1   |   at createRetriever (./.output/server/chunks/_/index.mjs:485:23)

docker运行情况如下

(base) root@10-230-170-25:/data/chatollama_docker_deploy# docker ps
CONTAINER ID   IMAGE                                      COMMAND                  CREATED          STATUS                  PORTS                                                                                                                                 NAMES
9dcc3f2ee8e1   chromadb/chroma                            "/docker_entrypoint.…"   56 seconds ago   Up 5 seconds            0.0.0.0:8000->8000/tcp, :::8000->8000/tcp                                                                                             chatollama_docker_deploy-chromadb-1
f4d24c399c6e   0001coder/chatollama:latest                "docker-entrypoint.s…"   56 seconds ago   Up 5 seconds            0.0.0.0:3000->3000/tcp, :::3000->3000/tcp                                                                                             chatollama_docker_deploy-chatollama-1
21d12b3f0c91   redis:latest                               "docker-entrypoint.s…"   56 seconds ago   Up 5 seconds            6379/tcp                                                                                                                              chatollama_docker_deploy-redis-1
b29858199342   ghcr.io/sugarforever/peanut-shell:latest   "uvicorn main:app --…"   56 seconds ago   Up 5 seconds                                                                                                                                                  chatollama_docker_deploy-peanutshell-1
3f3eecd2693e   milvusdb/milvus:v2.4.1                     "/tini -- milvus run…"   25 hours ago     Up 25 hours (healthy)   0.0.0.0:2379->2379/tcp, :::2379->2379/tcp, 0.0.0.0:9091->9091/tcp, :::9091->9091/tcp, 0.0.0.0:19530->19530/tcp, :::19530->19530/tcp   milvus-standalone
michael7736 commented 3 months ago

我也遇到相同的问题,这个问题应该是和milvus有关系,我切回Chroma 后就好了