Compare commits

..

No commits in common. "ce2cd9469e9b2e053e470a1fb6e8a3302ff6ed64" and "e4313b439a47c8ae399d2e6fba51c07e9dfb54b4" have entirely different histories.

10 changed files with 1367 additions and 1748 deletions

View file

@ -5,9 +5,6 @@ on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
MONGO_URI: justtotes
NOVA_KEY: ${{ secrets.NOVA_KEY }}
steps:
- name: Checkout code
@ -16,17 +13,22 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install uvicorn
- name: Start API server
env:
MONGO_URI: ${{ secrets.MONGO_URI }}
TEST_NOVA_KEY: ${{ secrets.NOVA_KEY }}
run: |
python run
- name: Wait for API server to start
run: sleep 10 # We can adjust this sleep duration as needed. idk how long the server takes to start
- name: Run tests
run: python tests

View file

@ -12,7 +12,7 @@ Reverse proxy server for "Closed"AI's API.
![Badge showing the number of forks](https://img.shields.io/github/forks/novaoss/nova-api?style=social)
![Badge showing the number of watchers](https://img.shields.io/github/watchers/novaoss/nova-api?style=social)
![Nova-API Conver/Banner Image - a picture of a galaxy with the caption "the core API server"](https://i.ibb.co/ZBhkS56/nova-api.png)
![Nova-API Conver/Banner Image. A picture of a galaxy with the caption "the core API server"](https://i.ibb.co/ZBhkS56/nova-api.png)
> "*OpenAI is very closed*"
>
@ -20,29 +20,13 @@ Reverse proxy server for "Closed"AI's API.
We aim to fix that!
## Star History
###### *I founded FoxGPT (called *NovaGPT* back then)
Old, slow, deprecated* FoxGPT vs new NovaAI repository star count:
<a href="https://star-history.com/#NovaOSS/nova-api&FoxGPT/gpt&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=NovaOSS/nova-api,FoxGPT/gpt&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=NovaOSS/nova-api,FoxGPT/gpt&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=NovaOSS/nova-api,FoxGPT/gpt&type=Date" />
</picture>
</a>
<img alt="'Emotional damage' meme, with a man with a worried face and the yellow caption 'emotional damage'" src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Findianmemetemplates.com%2Fwp-content%2Fuploads%2Femotional-damage-1024x575.jpg&f=1&nofb=1&ipt=b325721ee0a7b9e11603a9bd484c8042b82e1704e639887107c6ce3e0d9b389e&ipo=images" height=100>
## NovaOSS APIs
Our infrastructure might seem a bit confusing, but it's actually quite simple. Just the first one really matters for you, if you want to access our AI API. The other ones are just for the team.
### AI API
**Public** (everyone can use it with a valid API key)
Endpoint: `https://api.nova-oss.com/v1/...`
Official endpoints: `https://api.nova-oss.com/v1/...`
Documentation & info: [nova-oss.com](https://nova-oss.com)
- Access to AI models
@ -52,24 +36,16 @@ Documentation & info: [nova-oss.com](https://nova-oss.com)
### User/Account management API
**Private** (NovaOSS operators only!)
Endpoint: `https://api.nova-oss.com/...`
Official endpoints: `https://api.nova-oss.com/...`
Documentation: [api.nova-oss.com/docs](https://api.nova-oss.com/docs)
- Access to user accounts
- Implemented in [NovaCord](https://nova-oss.com/novacord)
### NovaCord Bot API
**Private** (NovaOSS operators only!)
Endpoint: `http://0.0.0.0:3224/...`
- acess to Discord server member roles (for receiving the Discord level, ...)
- hosted using [NovaCord](https://nova-oss.com/novacord)
### Website API
**Private** (NovaOSS operators only!)
Endpoint: `https://nova-oss.com/api/...`
Official endpoints: `https://nova-oss.com/api/...`
This one's code can be found in the following repository: [github.com/novaoss/nova-web](https://github.com/novaoss/nova-web)

View file

@ -18,7 +18,7 @@ UA_SIMPLIFY = {
## MONGODB Setup
conn = AsyncIOMotorClient(os.environ['MONGO_URI'])
conn = AsyncIOMotorClient(os.getenv('MONGO_URI'))
async def _get_collection(collection_name: str):
return conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name]

View file

@ -23,7 +23,7 @@ class StatsManager:
"""
def __init__(self):
self.conn = AsyncIOMotorClient(os.environ['MONGO_URI'])
self.conn = AsyncIOMotorClient(os.getenv('MONGO_URI'))
async def _get_collection(self, collection_name: str):
return self.conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name]

View file

@ -35,7 +35,7 @@ class UserManager:
"""
def __init__(self):
self.conn = AsyncIOMotorClient(os.environ['MONGO_URI'])
self.conn = AsyncIOMotorClient(os.getenv('MONGO_URI'))
async def _get_collection(self, collection_name: str):
return self.conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name]

View file

@ -1,6 +1,30 @@
{
"object": "list",
"data": [
{
"id": "gpt-4-0613",
"object": "model",
"created": 1686588896,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-5xwZl3df52xxBXzb4cTMtGYV",
"object": "model_permission",
"created": 1690865538,
"allow_create_engine": false,
"allow_sampling": false,
"allow_logprobs": false,
"allow_search_indices": false,
"allow_view": false,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-4-0613",
"parent": null
},
{
"id": "text-davinci-001",
"object": "model",
@ -49,30 +73,6 @@
"root": "text-search-curie-query-001",
"parent": null
},
{
"id": "gpt-3.5-turbo",
"object": "model",
"created": 1677610602,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-aRL68Vu37kh2Z0wi2tmPhGZT",
"object": "model_permission",
"created": 1692458060,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-3.5-turbo",
"parent": null
},
{
"id": "davinci",
"object": "model",
@ -97,54 +97,6 @@
"root": "davinci",
"parent": null
},
{
"id": "gpt-3.5-turbo-0613",
"object": "model",
"created": 1686587434,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-pgz6Bp5e90wX6lXRwF6SaqeZ",
"object": "model_permission",
"created": 1692458062,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-3.5-turbo-0613",
"parent": null
},
{
"id": "babbage",
"object": "model",
"created": 1649358449,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-h574xGeqWyBeFDDKaoVTC4CO",
"object": "model_permission",
"created": 1692394129,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "babbage",
"parent": null
},
{
"id": "text-babbage-001",
"object": "model",
@ -200,9 +152,9 @@
"owned_by": "openai-internal",
"permission": [
{
"id": "modelperm-fTR6rjcTAYYKKqzDu6U8ht6h",
"id": "modelperm-a6niqBmW2JaGmo0fDO7FEt1n",
"object": "model_permission",
"created": 1692374815,
"created": 1690930172,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
@ -217,6 +169,30 @@
"root": "text-davinci-003",
"parent": null
},
{
"id": "gpt-3.5-turbo-16k-0613",
"object": "model",
"created": 1685474247,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-OPkkjVBEz20IWVysAi72govM",
"object": "model_permission",
"created": 1691516018,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-3.5-turbo-16k-0613",
"parent": null
},
{
"id": "davinci-similarity",
"object": "model",
@ -289,6 +265,54 @@
"root": "text-similarity-curie-001",
"parent": null
},
{
"id": "gpt-3.5-turbo-16k",
"object": "model",
"created": 1683758102,
"owned_by": "openai-internal",
"permission": [
{
"id": "modelperm-BYGQj1rUnLdY0H1Q5na1ONCB",
"object": "model_permission",
"created": 1691516057,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-3.5-turbo-16k",
"parent": null
},
{
"id": "text-embedding-ada-002",
"object": "model",
"created": 1671217299,
"owned_by": "openai-internal",
"permission": [
{
"id": "modelperm-F3BGCNGb0ChzFesHIYjbNYUX",
"object": "model_permission",
"created": 1690865307,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": true,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "text-embedding-ada-002",
"parent": null
},
{
"id": "ada-code-search-text",
"object": "model",
@ -337,30 +361,6 @@
"root": "text-search-ada-query-001",
"parent": null
},
{
"id": "gpt-3.5-turbo-16k-0613",
"object": "model",
"created": 1685474247,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-hb67ObpoaFIKTieIMs9CqZPq",
"object": "model_permission",
"created": 1692458644,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-3.5-turbo-16k-0613",
"parent": null
},
{
"id": "gpt-4-0314",
"object": "model",
@ -434,15 +434,15 @@
"parent": null
},
{
"id": "text-curie-001",
"id": "gpt-3.5-turbo",
"object": "model",
"created": 1649364043,
"created": 1677610602,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-epkpKCMZ4ezExtQH69gwuIVE",
"id": "modelperm-zy5TOjnE2zVaicIcKO9bQDgX",
"object": "model_permission",
"created": 1692389420,
"created": 1690864883,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
@ -454,31 +454,7 @@
"is_blocking": false
}
],
"root": "text-curie-001",
"parent": null
},
{
"id": "gpt-3.5-turbo-16k",
"object": "model",
"created": 1683758102,
"owned_by": "openai-internal",
"permission": [
{
"id": "modelperm-BPjHua9GyiXIbj7F0M6c4j0A",
"object": "model_permission",
"created": 1692458652,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-3.5-turbo-16k",
"root": "gpt-3.5-turbo",
"parent": null
},
{
@ -625,6 +601,30 @@
"root": "text-search-curie-doc-001",
"parent": null
},
{
"id": "gpt-3.5-turbo-0301",
"object": "model",
"created": 1677649963,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-7WmfQzsq5FJ92UAnn24LduAN",
"object": "model_permission",
"created": 1690842565,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-3.5-turbo-0301",
"parent": null
},
{
"id": "babbage-search-document",
"object": "model",
@ -649,30 +649,6 @@
"root": "babbage-search-document",
"parent": null
},
{
"id": "gpt-4-32k-0314",
"object": "model",
"created": 1687979321,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-lLwi9dsP7ZoboO1MHIJrIUSq",
"object": "model_permission",
"created": 1692399181,
"allow_create_engine": false,
"allow_sampling": false,
"allow_logprobs": false,
"allow_search_indices": false,
"allow_view": false,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-4-32k-0314",
"parent": null
},
{
"id": "babbage-code-search-text",
"object": "model",
@ -697,30 +673,6 @@
"root": "babbage-code-search-text",
"parent": null
},
{
"id": "text-embedding-ada-002",
"object": "model",
"created": 1671217299,
"owned_by": "openai-internal",
"permission": [
{
"id": "modelperm-6xIVIGILGxg9gTVWY0SpzkFn",
"object": "model_permission",
"created": 1692313508,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": true,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "text-embedding-ada-002",
"parent": null
},
{
"id": "davinci-instruct-beta",
"object": "model",
@ -842,27 +794,27 @@
"parent": null
},
{
"id": "gpt-4-32k",
"id": "babbage",
"object": "model",
"created": 1687979321,
"created": 1649358449,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-isyZq5njWHQyHLCf26WtwCTY",
"id": "modelperm-vZIqTaVk4K37PezAFVHAEW3H",
"object": "model_permission",
"created": 1692377623,
"created": 1690943947,
"allow_create_engine": false,
"allow_sampling": false,
"allow_logprobs": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-4-32k",
"root": "babbage",
"parent": null
},
{
@ -962,15 +914,39 @@
"parent": null
},
{
"id": "gpt-4-32k-0613",
"id": "whisper-1",
"object": "model",
"created": 1686614047,
"created": 1677532384,
"owned_by": "openai-internal",
"permission": [
{
"id": "modelperm-YfjOENC37iATh6VsjLLpYdeq",
"object": "model_permission",
"created": 1691514055,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "whisper-1",
"parent": null
},
{
"id": "gpt-4",
"object": "model",
"created": 1687882411,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-dwq8JoR7RqfTJHDVCxUe8GUB",
"id": "modelperm-ufulBjea4GV50lNUk7TL02lX",
"object": "model_permission",
"created": 1692377639,
"created": 1691192558,
"allow_create_engine": false,
"allow_sampling": false,
"allow_logprobs": false,
@ -982,7 +958,7 @@
"is_blocking": false
}
],
"root": "gpt-4-32k-0613",
"root": "gpt-4",
"parent": null
},
{
@ -1010,15 +986,15 @@
"parent": null
},
{
"id": "whisper-1",
"id": "ada",
"object": "model",
"created": 1677532384,
"owned_by": "openai-internal",
"created": 1649357491,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-Qbzvr0DnIyt2HdaFiLj0P5h4",
"id": "modelperm-mEzQ65zcTNX233nYMXVZjvmy",
"object": "model_permission",
"created": 1692314508,
"created": 1690950776,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
@ -1030,31 +1006,7 @@
"is_blocking": false
}
],
"root": "whisper-1",
"parent": null
},
{
"id": "gpt-4",
"object": "model",
"created": 1687882411,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-cOSx57rPrEzolEUD2QSSACPS",
"object": "model_permission",
"created": 1692411452,
"allow_create_engine": false,
"allow_sampling": false,
"allow_logprobs": false,
"allow_search_indices": false,
"allow_view": false,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-4",
"root": "ada",
"parent": null
},
{
@ -1105,30 +1057,6 @@
"root": "davinci-search-document",
"parent": null
},
{
"id": "gpt-4-0613",
"object": "model",
"created": 1686588896,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-kZWPVNfDP5WlVYNfcopBABZB",
"object": "model_permission",
"created": 1692411496,
"allow_create_engine": false,
"allow_sampling": false,
"allow_logprobs": false,
"allow_search_indices": false,
"allow_view": false,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-4-0613",
"parent": null
},
{
"id": "curie-search-query",
"object": "model",
@ -1177,30 +1105,6 @@
"root": "babbage-similarity",
"parent": null
},
{
"id": "ada",
"object": "model",
"created": 1649357491,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-gUTBN2NFYvvG3UwNeDnY6EEe",
"object": "model_permission",
"created": 1692393802,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "ada",
"parent": null
},
{
"id": "ada-search-document",
"object": "model",
@ -1273,6 +1177,30 @@
"root": "text-similarity-davinci-001",
"parent": null
},
{
"id": "curie",
"object": "model",
"created": 1649359874,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-0g6LBMO3cgUpTYzehqtF9G1i",
"object": "model_permission",
"created": 1690950807,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "curie",
"parent": null
},
{
"id": "curie-similarity",
"object": "model",
@ -1297,6 +1225,30 @@
"root": "curie-similarity",
"parent": null
},
{
"id": "gpt-3.5-turbo-0613",
"object": "model",
"created": 1686587434,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-XIXH7QF7QM60DDcON9eaGFfk",
"object": "model_permission",
"created": 1690842445,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "gpt-3.5-turbo-0613",
"parent": null
},
{
"id": "babbage-code-search-code",
"object": "model",
@ -1370,15 +1322,15 @@
"parent": null
},
{
"id": "gpt-3.5-turbo-0301",
"id": "text-curie-001",
"object": "model",
"created": 1677649963,
"created": 1649364043,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-I4IcSJFYZl2fIK0DPSBkgK3d",
"id": "modelperm-vcuXVPe8oCucYrY0hxBNBXRd",
"object": "model_permission",
"created": 1691712139,
"created": 1690915039,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
@ -1390,320 +1342,8 @@
"is_blocking": false
}
],
"root": "gpt-3.5-turbo-0301",
"root": "text-curie-001",
"parent": null
},
{
"id": "curie",
"object": "model",
"created": 1649359874,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-cXKYjZ0dQvxFHt2rqkdTWYCz",
"object": "model_permission",
"created": 1692392433,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "curie",
"parent": null
},
{
"id": "davinci:ft-fixie-ai:industruous-facts-2022-10-13-01-17-15",
"object": "model",
"created": 1665623835,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-qmCpjvRypiW6x5MZx8kYs6O4",
"object": "model_permission",
"created": 1665623835,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai:industruous-facts-2022-10-12-23-26-28",
"object": "model",
"created": 1665617188,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-kBM7YxDdBx7y0JtMpZZnTnCY",
"object": "model_permission",
"created": 1665617188,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai-2022-09-16-18-23-16",
"object": "model",
"created": 1663352597,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-SeuOQWbIya3BNKelkdDAi4Qq",
"object": "model_permission",
"created": 1663352597,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai:promptrunner-2022-11-24-01-53-01",
"object": "model",
"created": 1669254781,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-UlqCtflESCgu6wuml4ybiBTM",
"object": "model_permission",
"created": 1669254781,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai:industruous-facts-2022-10-12-21-43-54",
"object": "model",
"created": 1665611034,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-U6mB4aXW3ArdSIrElC4YFqtp",
"object": "model_permission",
"created": 1665611034,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai:industruous-facts-fill-tokenlength-2022-10-13-23-33-54",
"object": "model",
"created": 1665704034,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-viRUnGSfaVnkJVXamTPOrnmS",
"object": "model_permission",
"created": 1665704034,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai:industruous-facts-fill-tokenlength-2022-10-14-00-23-52",
"object": "model",
"created": 1665707032,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-BD65SMak4b2EmvLXL1whg4qB",
"object": "model_permission",
"created": 1665707032,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai-2022-10-05-17-53-03",
"object": "model",
"created": 1664992384,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-PdsJulMafesbkJH2UIEyxovh",
"object": "model_permission",
"created": 1664992384,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai:industruous-facts-fill-no-sample-qa-2022-10-14-01-25-25",
"object": "model",
"created": 1665710725,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-NFC2u7j45p63DTpoC9zM8R4X",
"object": "model_permission",
"created": 1665710725,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai:industruous-facts-no-sample-qa-2022-10-14-03-14-08",
"object": "model",
"created": 1665717249,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-5y121LGwoIr87Xl3qYh31JSa",
"object": "model_permission",
"created": 1665717249,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai:industruous-facts-no-sample-qa-2022-10-14-22-14-09",
"object": "model",
"created": 1665785649,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-mWTPRq0Qo0N1G3PDU7EZZRfU",
"object": "model_permission",
"created": 1665785649,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
},
{
"id": "davinci:ft-fixie-ai:picard-2022-10-06-05-10-37",
"object": "model",
"created": 1665033038,
"owned_by": "fixie-ai",
"permission": [
{
"id": "snapperm-mrAAsZbq6EKuaEcjGMIqQDzw",
"object": "model_permission",
"created": 1665033038,
"allow_create_engine": true,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": true,
"organization": "org-om1NsPYwZBBiNRoN36vWDTrC",
"group": null,
"is_blocking": false
}
],
"root": "davinci:2020-05-03",
"parent": "davinci:2020-05-03"
}
]
}

View file

@ -28,9 +28,6 @@ async def handle(incoming_request):
users = UserManager()
path = incoming_request.url.path.replace('v1/v1/', 'v1/')
if '/models' in path:
return fastapi.responses.JSONResponse(content=models_list)
try:
payload = await incoming_request.json()
except json.decoder.JSONDecodeError:
@ -55,6 +52,10 @@ async def handle(incoming_request):
if ban_reason:
return await errors.error(403, f'Your NovaAI account has been banned. Reason: "{ban_reason}".', 'Contact the staff for an appeal.')
path_contains_models = '/models' in path
if path_contains_models:
return fastapi.responses.JSONResponse(content=models_list)
costs = config['costs']
cost = costs['other']

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 KiB

BIN
image.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 KiB

View file

@ -109,7 +109,7 @@ def test_all():
if __name__ == '__main__':
closedai.api_base = api_endpoint
closedai.api_key = os.environ['NOVA_KEY']
closedai.api_key = os.getenv('TEST_NOVA_KEY')
HEADERS = {
'Content-Type': 'application/json',