Requesty
Requesty
Properties used to connect to Requesty.
requesty
- Type:
true| {
model?: string,
max_tokens?: number,
system_prompt?: string,
tools?: RequestyTool[],
function_handler?: FunctionHandler
} - Default: {model: "openai/gpt-4o"}
Connect to Requesty's Chat Completion API. Requesty is an OpenAI-compatible LLM gateway, so models are
referenced using the provider/model naming convention. You can set this property to true or configure it using an object:
model is the name of the model to be used by the API (e.g., "openai/gpt-4o-mini").
max_tokens limits the maximum number of tokens in the generated response.
system_prompt provides behavioral context and instructions to the model.
tools defines available function declarations for the model to call.
function_handler enables function calling capabilities for tool use.
Example
- Sample code
- Full code
<deep-chat
directConnection='{
"requesty": {
"key": "placeholder key",
"model": "openai/gpt-4o-mini"
}
}'
></deep-chat>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<deep-chat
directConnection='{
"requesty": {
"key": "placeholder key",
"model": "openai/gpt-4o-mini"
}
}'
style="border-radius: 8px"
></deep-chat>
Use stream to stream the AI responses.
Vision Example
Upload images alongside your text prompts for visual understanding. You must use a model with vision capabilities.
- Sample code
- Full code
<deep-chat
directConnection='{
"requesty": {
"key": "placeholder key",
"model": "openai/gpt-4o"
}
}'
images="true"
camera="true"
></deep-chat>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<deep-chat
directConnection='{
"requesty": {
"key": "placeholder key",
"model": "openai/gpt-4o"
}
}'
images="true"
camera="true"
style="border-radius: 8px"
textInput='{"styles": {"container": {"width": "77%"}}}'
></deep-chat>
When sending images we advise you to set maxMessages to 1 to send less data and reduce costs.
Types
Objects used for the requesty property:
RequestyTool
- Type: {
type: 'function',function: {name: string, description: string, parameters: object}}
Defines a function that the model is able to call. See the Function calling section for more.
FunctionHandler
- Type: (
functionsDetails: FunctionsDetails) =>{response: string}[]|{text: string}
The function used to handle the tool calls requested by the model. See tools for the related configuration.