You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Set the timeout period in milliseconds for assistant runs. Helps manage system load by limiting total run operation time. [More info](/docs/configuration/librechat_yaml/object_structure/assistants_endpoint#timeoutms)
29
29
- Specify which assistant Ids are supported or excluded [More info](/docs/configuration/librechat_yaml/object_structure/assistants_endpoint#supportedids)
30
30
31
+
## Strict function calling
32
+
With librechat you can add add the 'x-strict': true flag at operation-level in the openapi spec for actions.
33
+
This will automatically generate function calls with 'strict' mode enabled.
34
+
Note that strict mode supports only a partial subset of json. Read https://platform.openai.com/docs/guides/structured-outputs/some-type-specific-keywords-are-not-yet-supported for details.
35
+
36
+
For example:
37
+
```json filename="mathapi.json"
38
+
{
39
+
"openapi": "3.1.0",
40
+
"info": {
41
+
"title": "Math.js API",
42
+
"description": "API for performing mathematical operations, such as addition, subtraction, etc.",
43
+
"version": "1.0.0"
44
+
},
45
+
"servers": [
46
+
{
47
+
"url": "https://api.mathjs.org/v4"
48
+
}
49
+
],
50
+
"paths": {
51
+
"/": {
52
+
"post": {
53
+
"summary": "Evaluate a mathematical expression",
54
+
"description": "Sends a mathematical expression in the request body to evaluate.",
55
+
"operationId": "math",
56
+
"x-strict": true,
57
+
"parameters": [
58
+
"requestBody": {
59
+
"required": true,
60
+
"content": {
61
+
"application/json": {
62
+
"schema": {
63
+
"type": "object",
64
+
"properties": {
65
+
"expr": {
66
+
"type": "string",
67
+
"description": "The mathematical expression to evaluate (e.g., `2+3`)."
68
+
}
69
+
},
70
+
"required": ["expr"]
71
+
}
72
+
}
73
+
}
74
+
},
75
+
"responses": {
76
+
"200": {
77
+
"description": "The result of the evaluated expression.",
78
+
"content": {
79
+
"application/json": {
80
+
"schema": {
81
+
"type": "object",
82
+
"properties": {
83
+
"result": {
84
+
"type": "number",
85
+
"description": "The evaluated result of the expression."
86
+
}
87
+
}
88
+
}
89
+
}
90
+
}
91
+
},
92
+
"400": {
93
+
"description": "Invalid expression provided.",
94
+
"content": {
95
+
"application/json": {
96
+
"schema": {
97
+
"type": "object",
98
+
"properties": {
99
+
"error": {
100
+
"type": "string",
101
+
"description": "Error message describing the invalid expression."
Note that you can add add the 'x-strict': true flag at operation-level in the OpenAPI spec for actions.
93
+
If using an OpenAI model supporting it, this will automatically generate function calls with 'strict' mode enabled.
94
+
Strict mode supports only a partial subset of json. Read https://platform.openai.com/docs/guides/structured-outputs/some-type-specific-keywords-are-not-yet-supported for details.
0 commit comments