|
1142 | 1142 | "required": true, |
1143 | 1143 | "schema": { |
1144 | 1144 | "type": "string", |
1145 | | - "enum": ["onnxruntime", "llama-cpp", "tensorrt-llm"] |
| 1145 | + "enum": ["llama-cpp", "onnxruntime", "tensorrt-llm"], |
| 1146 | + "default": "llama-cpp" |
1146 | 1147 | }, |
1147 | 1148 | "description": "The type of engine" |
1148 | 1149 | } |
|
1200 | 1201 | "required": true, |
1201 | 1202 | "schema": { |
1202 | 1203 | "type": "string", |
1203 | | - "enum": ["onnxruntime", "llama-cpp", "tensorrt-llm"] |
| 1204 | + "enum": ["llama-cpp", "onnxruntime", "tensorrt-llm"], |
| 1205 | + "default": "llama-cpp" |
1204 | 1206 | }, |
1205 | 1207 | "description": "The type of engine" |
1206 | 1208 | }, |
|
1245 | 1247 | "required": true, |
1246 | 1248 | "schema": { |
1247 | 1249 | "type": "string", |
1248 | | - "enum": ["onnxruntime", "llama-cpp", "tensorrt-llm"] |
| 1250 | + "enum": ["llama-cpp", "onnxruntime", "tensorrt-llm"], |
| 1251 | + "default": "llama-cpp" |
1249 | 1252 | }, |
1250 | 1253 | "description": "The type of engine" |
1251 | 1254 | }, |
|
1335 | 1338 | "required": true, |
1336 | 1339 | "schema": { |
1337 | 1340 | "type": "string", |
1338 | | - "enum": ["onnxruntime", "llama-cpp", "tensorrt-llm"] |
| 1341 | + "enum": ["llama-cpp", "onnxruntime", "tensorrt-llm"], |
| 1342 | + "default": "llama-cpp" |
1339 | 1343 | }, |
1340 | 1344 | "description": "The type of engine" |
1341 | 1345 | } |
|
1378 | 1382 | "required": true, |
1379 | 1383 | "schema": { |
1380 | 1384 | "type": "string", |
1381 | | - "enum": ["onnxruntime", "llama-cpp", "tensorrt-llm"] |
| 1385 | + "enum": ["llama-cpp", "onnxruntime", "tensorrt-llm"], |
| 1386 | + "default": "llama-cpp" |
1382 | 1387 | }, |
1383 | 1388 | "description": "The type of engine" |
1384 | 1389 | }, |
|
1433 | 1438 | "required": true, |
1434 | 1439 | "schema": { |
1435 | 1440 | "type": "string", |
1436 | | - "enum": ["onnxruntime", "llama-cpp", "tensorrt-llm"] |
| 1441 | + "enum": ["llama-cpp", "onnxruntime", "tensorrt-llm"], |
| 1442 | + "default": "llama-cpp" |
1437 | 1443 | }, |
1438 | 1444 | "description": "The name of the engine to update" |
1439 | 1445 | } |
|
1468 | 1474 | "required": true, |
1469 | 1475 | "schema": { |
1470 | 1476 | "type": "string", |
1471 | | - "enum": ["onnxruntime", "llama-cpp", "tensorrt-llm"] |
| 1477 | + "enum": ["llama-cpp", "onnxruntime", "tensorrt-llm"], |
| 1478 | + "default": "llama-cpp" |
1472 | 1479 | }, |
1473 | 1480 | "description": "The name of the engine to update" |
1474 | 1481 | } |
|
1505 | 1512 | "required": true, |
1506 | 1513 | "schema": { |
1507 | 1514 | "type": "string", |
1508 | | - "enum": ["onnxruntime", "llama-cpp", "tensorrt-llm"] |
| 1515 | + "enum": ["llama-cpp", "onnxruntime", "tensorrt-llm"], |
| 1516 | + "default": "llama-cpp" |
1509 | 1517 | }, |
1510 | 1518 | "description": "The name of the engine to update" |
1511 | 1519 | } |
|
1530 | 1538 | }, |
1531 | 1539 | "tags": ["Engines"] |
1532 | 1540 | } |
| 1541 | + }, |
| 1542 | + "/v1/configs": { |
| 1543 | + "get": { |
| 1544 | + "summary": "Get Configurations", |
| 1545 | + "description": "Retrieves the current configuration settings of the Cortex server.", |
| 1546 | + "responses": { |
| 1547 | + "200": { |
| 1548 | + "description": "Successful response", |
| 1549 | + "content": { |
| 1550 | + "application/json": { |
| 1551 | + "schema": { |
| 1552 | + "type": "object", |
| 1553 | + "properties": { |
| 1554 | + "allowed_origins": { |
| 1555 | + "type": "array", |
| 1556 | + "items": { |
| 1557 | + "type": "string" |
| 1558 | + }, |
| 1559 | + "example": ["http://localhost:39281", "https://cortex.so"] |
| 1560 | + }, |
| 1561 | + "cors": { |
| 1562 | + "type": "boolean", |
| 1563 | + "example": false |
| 1564 | + } |
| 1565 | + } |
| 1566 | + }, |
| 1567 | + "example": { |
| 1568 | + "allowed_origins": [ |
| 1569 | + "http://localhost:39281", |
| 1570 | + "https://cortex.so" |
| 1571 | + ], |
| 1572 | + "cors": false |
| 1573 | + } |
| 1574 | + } |
| 1575 | + } |
| 1576 | + } |
| 1577 | + }, |
| 1578 | + "tags": ["Configurations"] |
| 1579 | + }, |
| 1580 | + "patch": { |
| 1581 | + "tags": ["Configurations"], |
| 1582 | + "summary": "Update configuration settings", |
| 1583 | + "requestBody": { |
| 1584 | + "required": true, |
| 1585 | + "content": { |
| 1586 | + "application/json": { |
| 1587 | + "schema": { |
| 1588 | + "type": "object", |
| 1589 | + "properties": { |
| 1590 | + "cors": { |
| 1591 | + "type": "boolean", |
| 1592 | + "description": "Indicates whether CORS is enabled.", |
| 1593 | + "example": false |
| 1594 | + }, |
| 1595 | + "allowed_origins": { |
| 1596 | + "type": "array", |
| 1597 | + "items": { |
| 1598 | + "type": "string" |
| 1599 | + }, |
| 1600 | + "description": "List of allowed origins.", |
| 1601 | + "example": ["http://localhost:39281", "https://cortex.so"] |
| 1602 | + } |
| 1603 | + } |
| 1604 | + } |
| 1605 | + } |
| 1606 | + } |
| 1607 | + }, |
| 1608 | + "responses": { |
| 1609 | + "200": { |
| 1610 | + "description": "Configuration updated successfully", |
| 1611 | + "content": { |
| 1612 | + "application/json": { |
| 1613 | + "schema": { |
| 1614 | + "type": "object", |
| 1615 | + "properties": { |
| 1616 | + "config": { |
| 1617 | + "type": "object", |
| 1618 | + "properties": { |
| 1619 | + "allowed_origins": { |
| 1620 | + "type": "array", |
| 1621 | + "items": { |
| 1622 | + "type": "string" |
| 1623 | + }, |
| 1624 | + "example": [ |
| 1625 | + "http://localhost:39281", |
| 1626 | + "https://cortex.so" |
| 1627 | + ] |
| 1628 | + }, |
| 1629 | + "cors": { |
| 1630 | + "type": "boolean", |
| 1631 | + "example": false |
| 1632 | + } |
| 1633 | + } |
| 1634 | + }, |
| 1635 | + "message": { |
| 1636 | + "type": "string", |
| 1637 | + "example": "Configuration updated successfully" |
| 1638 | + } |
| 1639 | + } |
| 1640 | + } |
| 1641 | + } |
| 1642 | + } |
| 1643 | + } |
| 1644 | + } |
| 1645 | + } |
1533 | 1646 | } |
1534 | 1647 | }, |
1535 | 1648 | "info": { |
|
1559 | 1672 | "name": "Server", |
1560 | 1673 | "description": "These endpoints manage the lifecycle of Server, including heath check and shutdown." |
1561 | 1674 | }, |
| 1675 | + { |
| 1676 | + "name": "Configuration", |
| 1677 | + "description": "These endpoints manage the configuration of the Cortex server." |
| 1678 | + }, |
1562 | 1679 | { |
1563 | 1680 | "name": "Messages", |
1564 | 1681 | "description": "These endpoints manage the retrieval and storage of conversation content, including responses from LLMs and other metadata related to chat interactions." |
|
1587 | 1704 | "Running Models", |
1588 | 1705 | "Processes", |
1589 | 1706 | "Status", |
1590 | | - "Server" |
| 1707 | + "Server", |
| 1708 | + "Configurations" |
1591 | 1709 | ] |
1592 | 1710 | } |
1593 | 1711 | ], |
|
0 commit comments