mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-25 18:23:57 +01:00
Compare commits
14 commits
e4313b439a
...
ce2cd9469e
Author | SHA1 | Date | |
---|---|---|---|
ce2cd9469e | |||
474723c6dd | |||
c0867bb865 | |||
e3f938bb1a | |||
8719efd619 | |||
6d84c625a2 | |||
9be541fc45 | |||
299ef72860 | |||
ee0c9e9d96 | |||
162e128366 | |||
eebf72aea6 | |||
e7198cc6e3 | |||
188a6c3b70 | |||
1d527cf18b |
12
.github/workflows/tests.yml
vendored
12
.github/workflows/tests.yml
vendored
|
@ -5,6 +5,9 @@ on: [pull_request]
|
|||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MONGO_URI: justtotes
|
||||
NOVA_KEY: ${{ secrets.NOVA_KEY }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
@ -13,22 +16,17 @@ jobs:
|
|||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.10
|
||||
python-version: 3.x
|
||||
|
||||
- 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
|
||||
|
|
32
README.md
32
README.md
|
@ -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,13 +20,29 @@ 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)
|
||||
|
||||
Official endpoints: `https://api.nova-oss.com/v1/...`
|
||||
Endpoint: `https://api.nova-oss.com/v1/...`
|
||||
Documentation & info: [nova-oss.com](https://nova-oss.com)
|
||||
|
||||
- Access to AI models
|
||||
|
@ -36,16 +52,24 @@ Documentation & info: [nova-oss.com](https://nova-oss.com)
|
|||
### User/Account management API
|
||||
**Private** (NovaOSS operators only!)
|
||||
|
||||
Official endpoints: `https://api.nova-oss.com/...`
|
||||
Endpoint: `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!)
|
||||
|
||||
Official endpoints: `https://nova-oss.com/api/...`
|
||||
Endpoint: `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)
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ UA_SIMPLIFY = {
|
|||
|
||||
## MONGODB Setup
|
||||
|
||||
conn = AsyncIOMotorClient(os.getenv('MONGO_URI'))
|
||||
conn = AsyncIOMotorClient(os.environ['MONGO_URI'])
|
||||
|
||||
async def _get_collection(collection_name: str):
|
||||
return conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name]
|
||||
|
|
|
@ -23,7 +23,7 @@ class StatsManager:
|
|||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.conn = AsyncIOMotorClient(os.getenv('MONGO_URI'))
|
||||
self.conn = AsyncIOMotorClient(os.environ['MONGO_URI'])
|
||||
|
||||
async def _get_collection(self, collection_name: str):
|
||||
return self.conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name]
|
||||
|
|
|
@ -35,7 +35,7 @@ class UserManager:
|
|||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.conn = AsyncIOMotorClient(os.getenv('MONGO_URI'))
|
||||
self.conn = AsyncIOMotorClient(os.environ['MONGO_URI'])
|
||||
|
||||
async def _get_collection(self, collection_name: str):
|
||||
return self.conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name]
|
||||
|
|
806
api/models.json
806
api/models.json
|
@ -1,30 +1,6 @@
|
|||
{
|
||||
"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",
|
||||
|
@ -73,6 +49,30 @@
|
|||
"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,6 +97,54 @@
|
|||
"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",
|
||||
|
@ -152,9 +200,9 @@
|
|||
"owned_by": "openai-internal",
|
||||
"permission": [
|
||||
{
|
||||
"id": "modelperm-a6niqBmW2JaGmo0fDO7FEt1n",
|
||||
"id": "modelperm-fTR6rjcTAYYKKqzDu6U8ht6h",
|
||||
"object": "model_permission",
|
||||
"created": 1690930172,
|
||||
"created": 1692374815,
|
||||
"allow_create_engine": false,
|
||||
"allow_sampling": true,
|
||||
"allow_logprobs": true,
|
||||
|
@ -169,30 +217,6 @@
|
|||
"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",
|
||||
|
@ -265,54 +289,6 @@
|
|||
"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",
|
||||
|
@ -361,6 +337,30 @@
|
|||
"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": "gpt-3.5-turbo",
|
||||
"id": "text-curie-001",
|
||||
"object": "model",
|
||||
"created": 1677610602,
|
||||
"created": 1649364043,
|
||||
"owned_by": "openai",
|
||||
"permission": [
|
||||
{
|
||||
"id": "modelperm-zy5TOjnE2zVaicIcKO9bQDgX",
|
||||
"id": "modelperm-epkpKCMZ4ezExtQH69gwuIVE",
|
||||
"object": "model_permission",
|
||||
"created": 1690864883,
|
||||
"created": 1692389420,
|
||||
"allow_create_engine": false,
|
||||
"allow_sampling": true,
|
||||
"allow_logprobs": true,
|
||||
|
@ -454,7 +454,31 @@
|
|||
"is_blocking": false
|
||||
}
|
||||
],
|
||||
"root": "gpt-3.5-turbo",
|
||||
"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",
|
||||
"parent": null
|
||||
},
|
||||
{
|
||||
|
@ -601,30 +625,6 @@
|
|||
"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,6 +649,30 @@
|
|||
"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",
|
||||
|
@ -673,6 +697,30 @@
|
|||
"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",
|
||||
|
@ -794,27 +842,27 @@
|
|||
"parent": null
|
||||
},
|
||||
{
|
||||
"id": "babbage",
|
||||
"id": "gpt-4-32k",
|
||||
"object": "model",
|
||||
"created": 1649358449,
|
||||
"created": 1687979321,
|
||||
"owned_by": "openai",
|
||||
"permission": [
|
||||
{
|
||||
"id": "modelperm-vZIqTaVk4K37PezAFVHAEW3H",
|
||||
"id": "modelperm-isyZq5njWHQyHLCf26WtwCTY",
|
||||
"object": "model_permission",
|
||||
"created": 1690943947,
|
||||
"created": 1692377623,
|
||||
"allow_create_engine": false,
|
||||
"allow_sampling": true,
|
||||
"allow_logprobs": true,
|
||||
"allow_sampling": false,
|
||||
"allow_logprobs": false,
|
||||
"allow_search_indices": false,
|
||||
"allow_view": true,
|
||||
"allow_view": false,
|
||||
"allow_fine_tuning": false,
|
||||
"organization": "*",
|
||||
"group": null,
|
||||
"is_blocking": false
|
||||
}
|
||||
],
|
||||
"root": "babbage",
|
||||
"root": "gpt-4-32k",
|
||||
"parent": null
|
||||
},
|
||||
{
|
||||
|
@ -914,39 +962,15 @@
|
|||
"parent": null
|
||||
},
|
||||
{
|
||||
"id": "whisper-1",
|
||||
"id": "gpt-4-32k-0613",
|
||||
"object": "model",
|
||||
"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,
|
||||
"created": 1686614047,
|
||||
"owned_by": "openai",
|
||||
"permission": [
|
||||
{
|
||||
"id": "modelperm-ufulBjea4GV50lNUk7TL02lX",
|
||||
"id": "modelperm-dwq8JoR7RqfTJHDVCxUe8GUB",
|
||||
"object": "model_permission",
|
||||
"created": 1691192558,
|
||||
"created": 1692377639,
|
||||
"allow_create_engine": false,
|
||||
"allow_sampling": false,
|
||||
"allow_logprobs": false,
|
||||
|
@ -958,7 +982,7 @@
|
|||
"is_blocking": false
|
||||
}
|
||||
],
|
||||
"root": "gpt-4",
|
||||
"root": "gpt-4-32k-0613",
|
||||
"parent": null
|
||||
},
|
||||
{
|
||||
|
@ -986,15 +1010,15 @@
|
|||
"parent": null
|
||||
},
|
||||
{
|
||||
"id": "ada",
|
||||
"id": "whisper-1",
|
||||
"object": "model",
|
||||
"created": 1649357491,
|
||||
"owned_by": "openai",
|
||||
"created": 1677532384,
|
||||
"owned_by": "openai-internal",
|
||||
"permission": [
|
||||
{
|
||||
"id": "modelperm-mEzQ65zcTNX233nYMXVZjvmy",
|
||||
"id": "modelperm-Qbzvr0DnIyt2HdaFiLj0P5h4",
|
||||
"object": "model_permission",
|
||||
"created": 1690950776,
|
||||
"created": 1692314508,
|
||||
"allow_create_engine": false,
|
||||
"allow_sampling": true,
|
||||
"allow_logprobs": true,
|
||||
|
@ -1006,7 +1030,31 @@
|
|||
"is_blocking": false
|
||||
}
|
||||
],
|
||||
"root": "ada",
|
||||
"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",
|
||||
"parent": null
|
||||
},
|
||||
{
|
||||
|
@ -1057,6 +1105,30 @@
|
|||
"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",
|
||||
|
@ -1105,6 +1177,30 @@
|
|||
"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",
|
||||
|
@ -1177,30 +1273,6 @@
|
|||
"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",
|
||||
|
@ -1225,30 +1297,6 @@
|
|||
"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",
|
||||
|
@ -1322,15 +1370,15 @@
|
|||
"parent": null
|
||||
},
|
||||
{
|
||||
"id": "text-curie-001",
|
||||
"id": "gpt-3.5-turbo-0301",
|
||||
"object": "model",
|
||||
"created": 1649364043,
|
||||
"created": 1677649963,
|
||||
"owned_by": "openai",
|
||||
"permission": [
|
||||
{
|
||||
"id": "modelperm-vcuXVPe8oCucYrY0hxBNBXRd",
|
||||
"id": "modelperm-I4IcSJFYZl2fIK0DPSBkgK3d",
|
||||
"object": "model_permission",
|
||||
"created": 1690915039,
|
||||
"created": 1691712139,
|
||||
"allow_create_engine": false,
|
||||
"allow_sampling": true,
|
||||
"allow_logprobs": true,
|
||||
|
@ -1342,8 +1390,320 @@
|
|||
"is_blocking": false
|
||||
}
|
||||
],
|
||||
"root": "text-curie-001",
|
||||
"root": "gpt-3.5-turbo-0301",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -28,6 +28,9 @@ 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:
|
||||
|
@ -52,10 +55,6 @@ 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']
|
||||
|
||||
|
|
BIN
image-1.png
Normal file
BIN
image-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 566 KiB |
|
@ -109,7 +109,7 @@ def test_all():
|
|||
|
||||
if __name__ == '__main__':
|
||||
closedai.api_base = api_endpoint
|
||||
closedai.api_key = os.getenv('TEST_NOVA_KEY')
|
||||
closedai.api_key = os.environ['NOVA_KEY']
|
||||
|
||||
HEADERS = {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
Loading…
Reference in a new issue