gpt4free
gpt4free copied to clipboard
Doesn't work via docker
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
I encountered the same proble
same problem!
the same here
the same too
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"
}
}
],
When I perform a POST request I get the following result:
When I perform a POST request I get the following result:
![]()
I got this too. Try to set Provider is the same result.
When I perform a POST request I get the following result:
![]()
Try it again. For some reason, it randomly raises an exception.
When I perform a POST request I get the following result:
![]()
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 I Just pulled and tested, and everything is working for me, try to pull and check again!
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.
It's not working for me through docker.