Formation, Transformation, Eternal minds in eternal recreation. - J. W. Goethe
I'm always trying to learn and create something new, check where I have got to so far in my
FreeGPT4-WEB-API is a python server that allows you to have a self-hosted GPT-4 Unlimited and Free WEB API, via the latest Bing's AI (and much more).
Home Page: https://api.freegpt4.ddns.net/?text=Your Request Here
License: GNU General Public License v3.0
It would allow to make use of many existing 3rd-party tools.
Always respond
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Either the server is overloaded or there is an error in the application.
Input: 你看得见我吗?
g4f.provider.Bing supports: (model: str, messages: list[dict[str, str]], stream: bool)
Result Str:
127.0.0.1 - - [06/Oct/2023 22:52:15] "GET /?text=你看得见我吗? HTTP/1.1" 200 -
There is no results from Bing gpt4.
It will be awesome if you can provide an option to send 'system' and 'user prompts in the request json.
Hello there
Given bing is now open to public, without any login needs, can this be used without cookies.json now ?
I am using the docker compose version.
Cheers
So, if you ask a medium-long question, it just responds blank—nothing. Is it because of the tokens or the length of the message? (I'm not using any cookies, btw) or sum else? I really need an answer, please.
Getting the following error after sending request with default settings on bing:
[2024-03-24 22:16:54,169] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 2077, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1525, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1523, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1509, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/local/lib/python3.10/dist-packages/asgiref/sync.py", line 254, in call
return call_result.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/local/lib/python3.10/dist-packages/asgiref/sync.py", line 331, in main_wrap
result = await self.awaitable(*args, **kwargs)
File "/Free-GPT4-WEB-API-main/src/FreeGPT4_Server.py", line 146, in index
print(PROVIDERS[args.provider].params) # supported args
File "/usr/local/lib/python3.10/dist-packages/g4f/providers/base_provider.py", line 98, in params
for name, param in cls.get_parameters().items():
TypeError: AbstractProvider.get_parameters() missing 1 required positional argument: 'cls'
Hello,
I can log to the page setting but i can't actually use the chat, i have an error when putting the url http://127.0.0.1:5005/?text=your%20query
I've tried to use my own bing cookie file aswell but still have an error.
curl https://api.freegpt4.ddns.net/?text= hi
The Server is under maintenance, please be patient.
is this repo working or still maintained?
How do i host this for free? Can i host in github?
Include Installation in README.md
Most answers when using a language other than English, double answers appear.
>Hola.
Hola, este es Bing. ¿Qué quieres saber hoy? 😊 Hello, this is Bing. What do you want to know today? 😊
>Hola buenos días.
Hola, este es Bing. ¿En qué puedo ayudarte? 😊 Hello, this is Bing. How can I help you? 😊
# Cleans the response from the resources links
# INFO: Unsupported escape sequence in string literal
if (args.remove_sources):
if re.search("\[\^[0-9]+\^\]\[[0-9]+\]", resp_str):
resp_str = resp_str.split("\n\n")
if len(resp_str) > 1:
resp_str.pop(0)
resp_str = re.sub("\[\^[0-9]+\^\]\[[0-9]+\]", "", str(resp_str[0]))
Because of that bug, on average 40% of the request response is useless, due to Bing mostly answering in this manner :
🤖 Hello, I'm Bing ! Here is your reply :
- ....
when i use the comment python3 FreeGPT4_Server.py --enable-gui to open the gui. system say that :Port 5500 is in use by another program. Either identify and stop that program, or start the server with a different port. what is the a different port? thanks!
running the server on http://localhost:8081/ and i can see the ''Please enter a question'' msg.
How do you send a request and receive responses?
While attempting to use FreeGPT4_Server.py, I encountered a TypeError. The error occurs when the server attempts to process a GET request.
The error message indicates that an issue arises in the create_message function of the Bing.py file, specifically when trying to use the "|" operator with two dictionaries. Here's the traceback for the error:
Traceback (most recent call last):
File "/home/chris/.local/lib/python3.8/site-packages/flask/app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
File "/home/chris/.local/lib/python3.8/site-packages/flask/app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/chris/.local/lib/python3.8/site-packages/flask/app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
File "/home/chris/.local/lib/python3.8/site-packages/flask/app.py", line 852, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/chris/.local/lib/python3.8/site-packages/asgiref/sync.py", line 277, in __call__
return call_result.result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/home/chris/.local/lib/python3.8/site-packages/asgiref/sync.py", line 353, in main_wrap
result = await self.awaitable(*args, **kwargs)
File "FreeGPT4_Server.py", line 133, in index
await PROVIDERS[args.provider].create_async(
File "/home/chris/.local/lib/python3.8/site-packages/g4f/Provider/base_provider.py", line 122, in create_async
return "".join([
File "/home/chris/.local/lib/python3.8/site-packages/g4f/Provider/base_provider.py", line 122, in <listcomp>
return "".join([
File "/home/chris/.local/lib/python3.8/site-packages/g4f/Provider/Bing.py", line 447, in stream_generate
await wss.send_str(create_message(conversation, prompt, tone, context))
File "/home/chris/.local/lib/python3.8/site-packages/g4f/Provider/Bing.py", line 392, in create_message
'message': Defaults.location | {
TypeError: unsupported operand type(s) for |: 'dict' and 'dict'
This error prevents the server from functioning as expected. Could you please provide guidance on how to resolve this issue?
It seems difficult to enable webgui in docker container. please update the instructions. I tired following
command:
- "--remove-sources"
- "--enable-gui"
I can get the docker server started. However, when I go to host:port/settings, it shows a login page, but entering the password just refreshed the login page. it doesn't take to settings page.
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.