|
1491 | 1491 | ] |
1492 | 1492 | } |
1493 | 1493 | }, |
| 1494 | + "/api/extra/data/save": { |
| 1495 | + "post": { |
| 1496 | + "description": "Saves data to a slot in a database file in the KoboldCpp server.", |
| 1497 | + "requestBody": { |
| 1498 | + "content": { |
| 1499 | + "application/json": { |
| 1500 | + "example": { |
| 1501 | + "slot": "1", |
| 1502 | + "format": "kcpp_lzma_b64", |
| 1503 | + "title": "Untitled Story", |
| 1504 | + "data": "base64_data", |
| 1505 | + }, |
| 1506 | + "schema": { |
| 1507 | + "properties": { |
| 1508 | + "slot": { |
| 1509 | + "type": "string", |
| 1510 | + "description": "Save slot id to save to." |
| 1511 | + }, |
| 1512 | + "format": { |
| 1513 | + "type": "string", |
| 1514 | + "description": "Save format, not used currently" |
| 1515 | + }, |
| 1516 | + "title": { |
| 1517 | + "type": "string", |
| 1518 | + "description": "Title of this saved file" |
| 1519 | + }, |
| 1520 | + "data": { |
| 1521 | + "type": "string", |
| 1522 | + "description": "Save data text string" |
| 1523 | + }, |
| 1524 | + }, |
| 1525 | + "type": "object" |
| 1526 | + } |
| 1527 | + } |
| 1528 | + }, |
| 1529 | + "required": true |
| 1530 | + }, |
| 1531 | + "responses": { |
| 1532 | + "200": { |
| 1533 | + "content": { |
| 1534 | + "application/json": { |
| 1535 | + "example": { |
| 1536 | + "success": true, |
| 1537 | + "error": "" |
| 1538 | + }, |
| 1539 | + "schema": { |
| 1540 | + "properties": { |
| 1541 | + "success": { |
| 1542 | + "type": "boolean", |
| 1543 | + "description": "Whether the operation was successful." |
| 1544 | + }, |
| 1545 | + "error": { |
| 1546 | + "type": "string", |
| 1547 | + "description": "What went wrong." |
| 1548 | + } |
| 1549 | + } |
| 1550 | + } |
| 1551 | + } |
| 1552 | + }, |
| 1553 | + "description": "Successful request" |
| 1554 | + } |
| 1555 | + }, |
| 1556 | + "summary": "Saves data to a slot in a database file in the KoboldCpp server.", |
| 1557 | + "tags": [ |
| 1558 | + "api/extra/data" |
| 1559 | + ] |
| 1560 | + } |
| 1561 | + }, |
| 1562 | + "/api/extra/data/load": { |
| 1563 | + "post": { |
| 1564 | + "description": "Loads data from a save slot in the database file in the KoboldCpp server.", |
| 1565 | + "requestBody": { |
| 1566 | + "content": { |
| 1567 | + "application/json": { |
| 1568 | + "example": { |
| 1569 | + "slot": "1", |
| 1570 | + }, |
| 1571 | + "schema": { |
| 1572 | + "properties": { |
| 1573 | + "slot": { |
| 1574 | + "type": "string", |
| 1575 | + "description": "Save slot id" |
| 1576 | + }, |
| 1577 | + }, |
| 1578 | + "type": "object" |
| 1579 | + } |
| 1580 | + } |
| 1581 | + }, |
| 1582 | + "required": true |
| 1583 | + }, |
| 1584 | + "responses": { |
| 1585 | + "200": { |
| 1586 | + "content": { |
| 1587 | + "application/json": { |
| 1588 | + "example": { |
| 1589 | + "success": true, |
| 1590 | + "data": "base64_data" |
| 1591 | + }, |
| 1592 | + "schema": { |
| 1593 | + "properties": { |
| 1594 | + "success": { |
| 1595 | + "type": "boolean", |
| 1596 | + "description": "Whether the operation was successful." |
| 1597 | + }, |
| 1598 | + "data": { |
| 1599 | + "type": "string", |
| 1600 | + "description": "Text string containing the loaded data from server." |
| 1601 | + } |
| 1602 | + } |
| 1603 | + } |
| 1604 | + } |
| 1605 | + }, |
| 1606 | + "description": "Successful request" |
| 1607 | + } |
| 1608 | + }, |
| 1609 | + "summary": "Loads data from a save slot in the database file in the KoboldCpp server.", |
| 1610 | + "tags": [ |
| 1611 | + "api/extra/data" |
| 1612 | + ] |
| 1613 | + } |
| 1614 | + }, |
| 1615 | + "/api/extra/data/list": { |
| 1616 | + "post": { |
| 1617 | + "description": "List available saved slots from the KoboldCpp server, returns an array of strings containing their titles.", |
| 1618 | + "responses": { |
| 1619 | + "200": { |
| 1620 | + "content": { |
| 1621 | + "application/json": { |
| 1622 | + "example": ["Saved Story 1", "Saved Story 2", "", ""], |
| 1623 | + "schema": { |
| 1624 | + "type": "array", |
| 1625 | + "items": { |
| 1626 | + "type": "string" |
| 1627 | + } |
| 1628 | + } |
| 1629 | + } |
| 1630 | + }, |
| 1631 | + "description": "Successful request" |
| 1632 | + } |
| 1633 | + }, |
| 1634 | + "summary": "List available saved slots from the KoboldCpp server.", |
| 1635 | + "tags": [ |
| 1636 | + "api/extra/data" |
| 1637 | + ] |
| 1638 | + } |
| 1639 | + }, |
| 1640 | + "/api/admin/list_options": { |
| 1641 | + "get": { |
| 1642 | + "summary": "List available .kcpps files to load.", |
| 1643 | + "description": "List available .kcpps files to load.", |
| 1644 | + "tags": [ |
| 1645 | + "api/admin" |
| 1646 | + ], |
| 1647 | + "responses": { |
| 1648 | + "200": { |
| 1649 | + "content": { |
| 1650 | + "application/json": { |
| 1651 | + "example": ["file1.kcpps","file2.kcpps"], |
| 1652 | + "schema": { |
| 1653 | + "properties": {}, |
| 1654 | + "type": "object" |
| 1655 | + } |
| 1656 | + } |
| 1657 | + }, |
| 1658 | + "description": "Successful request" |
| 1659 | + } |
| 1660 | + }, |
| 1661 | + } |
| 1662 | + }, |
| 1663 | + "/api/admin/reload_config": { |
| 1664 | + "post": { |
| 1665 | + "description": "Switches the loaded config, along with any settings and model file changes.", |
| 1666 | + "requestBody": { |
| 1667 | + "content": { |
| 1668 | + "application/json": { |
| 1669 | + "example": { |
| 1670 | + "filename": "file1.kcpps", |
| 1671 | + }, |
| 1672 | + "schema": { |
| 1673 | + "properties": { |
| 1674 | + "filename": { |
| 1675 | + "type": "string", |
| 1676 | + "description": "Filename of the .kcpps config to be loaded. Any associated files and models will be automatically swapped in." |
| 1677 | + }, |
| 1678 | + }, |
| 1679 | + "type": "object" |
| 1680 | + } |
| 1681 | + } |
| 1682 | + }, |
| 1683 | + "required": true |
| 1684 | + }, |
| 1685 | + "responses": { |
| 1686 | + "200": { |
| 1687 | + "content": { |
| 1688 | + "application/json": { |
| 1689 | + "example": { |
| 1690 | + "success": true |
| 1691 | + }, |
| 1692 | + "schema": { |
| 1693 | + "properties": { |
| 1694 | + "success": { |
| 1695 | + "type": "boolean", |
| 1696 | + "description": "Whether the operation was successful." |
| 1697 | + } |
| 1698 | + } |
| 1699 | + } |
| 1700 | + } |
| 1701 | + }, |
| 1702 | + "description": "Successful request" |
| 1703 | + } |
| 1704 | + }, |
| 1705 | + "summary": "Switches the currently loaded .kcpps config, and reloads any changed files or models.", |
| 1706 | + "tags": [ |
| 1707 | + "api/admin" |
| 1708 | + ] |
| 1709 | + } |
| 1710 | + }, |
1494 | 1711 | "/props": { |
1495 | 1712 | "get": { |
1496 | 1713 | "summary": "Returns the Jinja template stored in the GGUF model, if found.", |
|
0 commit comments