GPT-4o Mini: Research Preview (Short-Term Availability)
This app provides you full access to GPT-4o mini (128K token limit). You don't need any OPENAI API key.
User Consent for Data Collection, Use, and Sharing
▼
By using our app, which is powered by OpenAI's API, you acknowledge and agree to the following terms regarding the data you provide:
Collection: We may collect information, including the inputs you type into our app, the outputs generated by OpenAI's API, and certain technical details about your device and connection (such as browser type, operating system, and IP address) provided by your device's request headers.
Use: We may use the collected data for research purposes, to improve our services, and to develop new products or services, including commercial applications, and for security purposes, such as protecting against unauthorized access and attacks.
Sharing and Publication: Your data, including the technical details collected from your device's request headers, may be published, shared with third parties, or used for analysis and reporting purposes.
Data Retention: We may retain your data, including the technical details collected from your device's request headers, for as long as necessary.
By continuing to use our app, you provide your explicit consent to the collection, use, and potential sharing of your data as described above. If you do not agree with our data collection, use, and sharing practices, please do not use our app.
I Agree
Use via APIlogo
·
ساخته شده با gradiologo
API documentation
yuntian-deng/ChatGPT
API Recorder
5 API endpoints
Choose a language to see the code snippets for interacting with the API.
- Install the python client (docs) if you don't already have it installed.
copy
$ pip install gradio_client
2. Find the API endpoint below corresponding to your desired function in the app. Copy the code snippet, replacing the placeholder values with your own input data. If this is a private Space, you may need to pass your Hugging Face token as well (read more). Or use the
API Recorder
to automatically generate your API requests.
api_name: /enable_inputs
copy
from gradio_client import Client
client = Client("yuntian-deng/ChatGPT")
result = client.predict(
api_name="/enable_inputs"
)
print(result)
Accepts 0 parameters:
Returns 1 element
api_name: /reset_textbox
copy
from gradio_client import Client
client = Client("yuntian-deng/ChatGPT")
result = client.predict(
api_name="/reset_textbox"
)
print(result)
Accepts 0 parameters:
Returns 1 element
str
The output value that appears in the "Type an input and press Enter" Textbox component.
api_name: /predict
copy
from gradio_client import Client
client = Client("yuntian-deng/ChatGPT")
result = client.predict(
inputs="Hello!!",
top_p=1,
temperature=1,
chat_counter=0,
chatbot=[],
api_name="/predict"
)
print(result)
Accepts 5 parameters:
inputs str Required
The input value that is provided in the "Type an input and press Enter" Textbox component.
top_p float Default: 1
The input value that is provided in the "Top-p (nucleus sampling)" Slider component.
temperature float Default: 1
The input value that is provided in the "Temperature" Slider component.
chat_counter float Default: 0
The input value that is provided in the "parameter_16" Number component.
chatbot Tuple[str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None, str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None] Default: []
The input value that is provided in the "parameter_4" Chatbot component.
Returns tuple of 4 elements
[0] Tuple[str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None, str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None]
The output value that appears in the "value_4" Chatbot component.
[1] float
The output value that appears in the "value_16" Number component.
[2] str
The output value that appears in the "Status code from OpenAI server" Textbox component.
[3] str
The output value that appears in the "Type an input and press Enter" Textbox component.
api_name: /reset_textbox_1
copy
from gradio_client import Client
client = Client("yuntian-deng/ChatGPT")
result = client.predict(
api_name="/reset_textbox_1"
)
print(result)
Accepts 0 parameters:
Returns 1 element
str
The output value that appears in the "Type an input and press Enter" Textbox component.
api_name: /predict_1
copy
from gradio_client import Client
client = Client("yuntian-deng/ChatGPT")
result = client.predict(
inputs="Hello!!",
top_p=1,
temperature=1,
chat_counter=0,
chatbot=[],
api_name="/predict_1"
)
print(result)
Accepts 5 parameters:
inputs str Required
The input value that is provided in the "Type an input and press Enter" Textbox component.
top_p float Default: 1
The input value that is provided in the "Top-p (nucleus sampling)" Slider component.
temperature float Default: 1
The input value that is provided in the "Temperature" Slider component.
chat_counter float Default: 0
The input value that is provided in the "parameter_16" Number component.
chatbot Tuple[str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None, str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None] Default: []
The input value that is provided in the "parameter_4" Chatbot component.
Returns tuple of 4 elements
[0] Tuple[str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None, str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None]
The output value that appears in the "value_4" Chatbot component.
[1] float
The output value that appears in the "value_16" Number component.
[2] str
The output value that appears in the "Status code from OpenAI server" Textbox component.
[3] str
The output value that appears in the "Type an input and press Enter" Textbox component.