Compare commits

...

23 commits

Author SHA1 Message Date
Game_Time add32ac000
Merge f5715df218 into a7b2ce7aa5 2023-08-22 20:04:00 +02:00
nsde a7b2ce7aa5 Fixed non-streamed text completions 2023-08-22 20:03:55 +02:00
Game_Time f5715df218
Update LICENSE 2023-08-20 17:43:38 +05:00
Game_Time 79467ddbf2
Merge branch 'NovaOSS:main' into main 2023-08-20 17:42:36 +05:00
Game_Time 99977b487f
Merge branch 'NovaOSS:main' into main 2023-08-20 17:31:04 +05:00
Game_Time 09e2b870e2
Merge branch 'NovaOSS:main' into main 2023-08-20 17:10:13 +05:00
Game_Time 109ebbea50
Merge branch 'NovaOSS:main' into main 2023-08-20 16:08:27 +05:00
Game_Time ca4aa9ecf0
Merge branch 'NovaOSS:main' into main 2023-08-20 16:03:42 +05:00
Game_Time 4118430aa4
Merge branch 'NovaOSS:main' into main 2023-08-20 15:48:48 +05:00
Game_Time b107d5ca98
Merge branch 'NovaOSS:main' into main 2023-08-20 15:33:38 +05:00
Game_Time 1a2ab86bad
Merge branch 'NovaOSS:main' into main 2023-08-20 15:29:44 +05:00
Game_Time f1bb0dc0bd
Merge branch 'NovaOSS:main' into main 2023-08-20 15:20:30 +05:00
Game_Time d233ae0c93
Merge branch 'NovaOSS:main' into main 2023-08-20 15:19:16 +05:00
Game_Time 8fe14135fd
Merge branch 'NovaOSS:main' into main 2023-08-20 06:54:14 +05:00
Game_Time 7ccd93c423
Merge branch 'NovaOSS:main' into main 2023-08-20 06:49:20 +05:00
Game_Time f7f37ddd59
Merge branch 'NovaOSS:main' into main 2023-08-19 19:28:31 +05:00
Game_Time e1d9bf042f
Merge branch 'NovaOSS:main' into main 2023-08-19 19:26:50 +05:00
Game_Time cb734f717c
Merge branch 'NovaOSS:main' into main 2023-08-19 19:23:04 +05:00
Game_Time 6098ed44b6
Merge branch 'NovaOSS:main' into main 2023-08-19 19:20:07 +05:00
Game_Time b32f4c5a7e
Merge branch 'NovaOSS:main' into main 2023-08-19 19:17:14 +05:00
Game_Time 9078ab6356
Merge branch 'NovaOSS:main' into main 2023-08-19 19:12:41 +05:00
Game_Time 12d5375f83
Merge branch 'NovaOSS:main' into main 2023-08-19 19:06:52 +05:00
Game_Time 87b113d93d
hehehaw 2023-08-19 19:05:14 +05:00
6 changed files with 8 additions and 7 deletions

View file

@ -12,7 +12,7 @@ software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software. cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast, to take away your freedom to share and change the works. By contrast
our General Public Licenses are intended to guarantee your freedom to our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free share and change all versions of a program--to make sure it remains free
software for all its users. software for all its users.

View file

@ -53,7 +53,7 @@ async def log_api_request(user: dict, incoming_request, target_url: str):
model = payload.get('model') model = payload.get('model')
ip_address = await network.get_ip(incoming_request) ip_address = await network.get_ip(incoming_request)
useragent = await replacer(incoming_request.headers.get('User-Agent'), UA_SIMPLIFY) useragent = await replacer(incoming_request.headers.get('User-Agent', ''), UA_SIMPLIFY)
new_log_item = { new_log_item = {
'timestamp': time.time(), 'timestamp': time.time(),

View file

@ -39,4 +39,4 @@ async def root():
'core_api_docs_for_nova_developers': '/docs' 'core_api_docs_for_nova_developers': '/docs'
} }
app.add_route('/{path:path}', transfer.handle, ['GET', 'POST', 'PUT', 'DELETE', 'PATCH']) app.add_route('/v1/{path:path}', transfer.handle, ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'])

View file

@ -116,7 +116,7 @@ async def stream(
cookies=target_request.get('cookies'), cookies=target_request.get('cookies'),
ssl=False, ssl=False,
timeout=aiohttp.ClientTimeout( timeout=aiohttp.ClientTimeout(
connect=3.0, connect=60,
total=float(os.getenv('TRANSFER_TIMEOUT', '120')) total=float(os.getenv('TRANSFER_TIMEOUT', '120'))
), ),
) as response: ) as response:

View file

@ -14,7 +14,7 @@ from helpers import tokens, errors
load_dotenv() load_dotenv()
models_list = json.load(open('models.json')) models_list = json.load(open('models.json', encoding='utf8'))
with open('config/config.yml', encoding='utf8') as f: with open('config/config.yml', encoding='utf8') as f:
config = yaml.safe_load(f) config = yaml.safe_load(f)
@ -26,7 +26,7 @@ async def handle(incoming_request):
Checks method, token amount, auth and cost along with if request is NSFW. Checks method, token amount, auth and cost along with if request is NSFW.
""" """
users = UserManager() users = UserManager()
path = incoming_request.url.path.replace('v1/v1/', 'v1/') path = incoming_request.url.path
if '/models' in path: if '/models' in path:
return fastapi.responses.JSONResponse(content=models_list) return fastapi.responses.JSONResponse(content=models_list)

View file

@ -1,2 +1,3 @@
import main import main
main.launch() main.launch()