Giter Site home page Giter Site logo

Comments (10)

tpmccallum avatar tpmccallum commented on June 20, 2024 1

Hi @mr-sk @JuergenCornely
I managed to get this working but probably won't explain it very well ...here goes:

  • Do a fresh git pull
  • Then open the llm-server/.env and put nothing other than just your API key in there (surrounded by '):
OPENAI_API_KEY='sk-proj-NJ...........................Vv'

At this point I also like to go in and update the number of pages that the data source is allowed to index by updating the value of 15 up to 150 in the llm-server/utils/llm_consts.py file i.e. (max_pages_to_crawl = int(os.getenv("MAX_PAGES_TO_CRAWL", "150")))

  • make install
  • When it comes up paste in the following commands
  • docker compose up -d --build --no-deps llm-server
  • docker compose up -d --build --no-deps worker

At this point it should work. I am not sure what part of that did the trick - but that is precisely what I did and it works!

from opencopilot.

JuergenCornely avatar JuergenCornely commented on June 20, 2024

i have the same behavior after upgrade with git pull to the latest Version. Installed Copiots cant be found and in the log file i see error from llmserver :
image

from opencopilot.

tpmccallum avatar tpmccallum commented on June 20, 2024

I have that same behaviour:

nginx-1       | 172.25.0.1 - - [12/Apr/2024:03:45:29 +0000] "GET /backend/copilot/ HTTP/1.1" 500 90 "http://localhost:8888/create/copilot" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"

from opencopilot.

tpmccallum avatar tpmccallum commented on June 20, 2024

Tried restarting nginx:

docker compose restart nginx
WARN[0000] The "TARGET" variable is not set. Defaulting to a blank string. 
[+] Restarting 1/1
 ✔ Container opencopilot-nginx-1  Started

Still the same error (500)

from opencopilot.

tpmccallum avatar tpmccallum commented on June 20, 2024

Updated to the latest code and tried again today, same issue:

nginx-1       | 2024/05/21 01:42:49 [error] 29#29: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.20.0.1, server: , request: "POST /backend/copilot/ HTTP/1.1", upstream: "http://172.20.0.5:8002/backend/copilot/", host: "localhost:8888", referrer: "http://localhost:8888/create/copilot"
nginx-1       | 172.20.0.1 - - [21/May/2024:01:42:49 +0000] "POST /backend/copilot/ HTTP/1.1" 502 559 "http://localhost:8888/create/copilot" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"

from opencopilot.

tpmccallum avatar tpmccallum commented on June 20, 2024

Here is how to replicate it.

git clone https://github.com/openchatai/OpenCopilot.git
cd OpenCopilot

Config:

vi llm-server/.env

Paste in the following (note the sk-your-api-key):

# For local development environment

# OpenAI Configuration
OPENAI_API_TYPE=openai
OPENAI_API_KEY='sk-your-api-key'

# Pinecone Configuration
PINECONE_API_KEY=  # Your Pinecone API Key
PINECONE_ENV=  # Your Pinecone Environment

# MongoDB Configuration
MONGODB_URL=mongodb://dbuser:dbpass@mongodb:27017  # Your MongoDB Connection URL

# QDRANT Configuration
QDRANT_URL=http://qdrant:6333  # QDRANT Server URL
SCORE_THRESHOLD=0.91  # Score Threshold
STORE=QDRANT  # Default Store

# Langchain Configuration
LANGCHAIN_TRACING_V2=false  # Enable Langchain Tracing V2
LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"  # Langchain API Endpoint
LANGCHAIN_API_KEY="TOKEN_GOES_HERE"  # Your Langchain API Key
LANGCHAIN_PROJECT="PROJECT_NAME_GOES_HERE"  # Your Langchain Project Name

# CoPilot Configuration
COPILOT_MODE=interactive  # CoPilot Mode

# MySQL Configuration
MYSQL_URI=mysql+pymysql://dbuser:dbpass@mysql:3306/opencopilot  # MySQL Connection URI

# Celery Configuration
CELERY_BROKER=redis://redis:6379/0  # Celery Broker URL
CELERY_BACKEND=redis://redis:6379/1  # Celery Backend URL

# Local IP Configuration
LOCAL_IP=host.docker.internal  # Local IP for Docker

# Shared Folder Configuration
SHARED_FOLDER=/app/shared_data/  # Path to Shared Data Folder

# Selenium Configuration
SELENIUM_GRID_URL=http://selenium:4444/wd/hub  # URL of the Selenium Grid for web scraping

Make and run:

cd ../../OpenCopilot
make install

from opencopilot.

tpmccallum avatar tpmccallum commented on June 20, 2024

cc: @codebanesr @ah7255703 @gharbat ⬆️

from opencopilot.

codebanesr avatar codebanesr commented on June 20, 2024

@tpmccallum probably some environment variable was messing it up! Thanks for the answer

from opencopilot.

tpmccallum avatar tpmccallum commented on June 20, 2024

Thanks @codebanesr
I wonder if you can help me understand this related error:

$ docker compose up -d --build --no-deps worker
WARN[0000] The "TARGET" variable is not set. Defaulting to a blank string. 
no such service: worker

Is this what you mean by some environmental variable not being set?

from opencopilot.

JuergenCornely avatar JuergenCornely commented on June 20, 2024

from opencopilot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.