The World's First fully free chatbot API
API Documentation
Xylaria API
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.
- 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.
- message str Required
The input value that is provided in the "Message" Textbox component.
- system_message str Default: "You are a friendly Chatbot who always responds in English unless the user specifically uses another language."
The input value that is provided in the "System message" Textbox component.
- max_tokens float Default: 512
The input value that is provided in the "Max new tokens" Slider component.
- temperature float Default: 0.7
The input value that is provided in the "Temperature" Slider component.
- top_p float Default: 0.95
The input value that is provided in the "Top-p (nucleus sampling)" Slider component.
- str
The output value that appears in the "Response" Textbox component.
$ pip install gradio_client
api_name: /chat
from gradio_client import Client client = Client("Lap1official/API") result = client.predict( message="Hello!!", system_message="You are a friendly Chatbot who always responds in English unless the user specifically uses another language.", max_tokens=512, temperature=0.7, top_p=0.95, api_name="/chat" ) print(result)
Comments
Post a Comment