gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

Doesn't work via docker

Open stasbalazuk opened this issue 1 year ago • 12 comments

Bug description I did everything according to these instructions: Setting up with Docker: If you have Docker installed, you can easily set up and run the project without manually installing dependencies.

First, ensure you have both Docker and Docker Compose installed.

Install Docker Install Docker Compose Clone the GitHub repo:

git clone https://github.com/xtekky/gpt4free.git Navigate to the project directory: cd gpt4free Build the Docker image: docker compose build Start the service using Docker Compose: docker compose up You server will now be running at http://localhost:1337. You can interact with the API or run your tests as you would normally.

To stop the Docker containers, simply run:

docker compose down Note: When using Docker, any changes you make to your local files will be reflected in the Docker container thanks to the volume mapping in the docker-compose.yml file. If you add or remove dependencies, however, you'll need to rebuild the Docker image using docker compose build.

Screenshots image image image

stasbalazuk avatar Sep 21 '23 13:09 stasbalazuk

I encountered the same proble

sadnessgirl avatar Sep 21 '23 14:09 sadnessgirl

same problem!

FacundoMartinezCampos avatar Sep 21 '23 14:09 FacundoMartinezCampos

the same here

Quynhpt98 avatar Sep 21 '23 23:09 Quynhpt98

the same too

maclxf avatar Sep 22 '23 02:09 maclxf

It's an API, not a web interface. Use /chat/completions endpoint and send a POST request with appropriate data.

Like this:

curl -X POST -H "Content-Type: application/json" -d '{
  "model": "gpt-3.5-turbo",
  "stream": false,
  "messages": [
    {
      "role": "user",
      "content": "hello, are you GPT 4?"
    }
  ]
}' http://localhost:1337/chat/completions

Response:

{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "Hello! Yes, I am powered by GPT-4.0. How can I assist you today?",
        "role": "assistant"
      }
    }
  ],

thebigbone avatar Sep 22 '23 12:09 thebigbone

When I perform a POST request I get the following result:

image image

stasbalazuk avatar Sep 22 '23 16:09 stasbalazuk

When I perform a POST request I get the following result:

image image

I got this too. Try to set Provider is the same result.

maclxf avatar Sep 25 '23 01:09 maclxf

When I perform a POST request I get the following result:

image image

Try it again. For some reason, it randomly raises an exception.

thebigbone avatar Sep 25 '23 04:09 thebigbone

When I perform a POST request I get the following result:

image image

I pull the latest commit and build again today. I got this.

{
    "choices": [
        {
            "finish_reason": "stop",
            "index": 0,
            "message": {
                "content": "Error",
                "role": "assistant"
            }
        }
    ],
    "created": 1695617083
}

maclxf avatar Sep 25 '23 04:09 maclxf

@maclxf I Just pulled and tested, and everything is working for me, try to pull and check again!

Quynhpt98 avatar Sep 28 '23 01:09 Quynhpt98

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

github-actions[bot] avatar Oct 07 '23 00:10 github-actions[bot]

It's not working for me through docker.

Zergrushe avatar Oct 10 '23 02:10 Zergrushe