mochii-neko / infinite-craft-gpt-server Goto Github PK
View Code? Open in Web Editor NEWAn alternative server for infinite craft that uses openai api
An alternative server for infinite craft that uses openai api
Mostly just the title. I really wanna try this cause it seems really cool but i can't really figure out how to do the uvicorn part. I've cloned the repo to a folder with git but i uvicorn elludes me. python, cmd, and miniconda3 all give a generic "not recognized" command when typing uvicorn. I knows its installed i can see it in my python folders i just don't know to use it :c
Also would this work with local models? Like running my own llm model through Text Generation Webui and using that api link instead of openai's api link. You can edit system prompts, termperature, cfg all dat stuff through Text Gen Webui
Logs:
Traceback (most recent call last):
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 412, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\fastapi\applications.py", line 1054, in call
await super().call(scope, receive, send)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\middleware\errors.py", line 186, in call
raise exc
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\middleware\errors.py", line 164, in call
await self.app(scope, receive, _send)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\middleware\cors.py", line 91, in call
await self.simple_response(scope, receive, send, request_headers=headers)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\middleware\cors.py", line 146, in simple_response
await self.app(scope, receive, send)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app
raise exc
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\routing.py", line 758, in call
await self.middleware_stack(scope, receive, send)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\routing.py", line 778, in app
await route.handle(scope, receive, send)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\routing.py", line 299, in handle
await self.app(scope, receive, send)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\routing.py", line 79, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app
raise exc
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\starlette\routing.py", line 74, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\fastapi\routing.py", line 278, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Bob\AppData\Local\Programs\Python\Python312\Lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Bob\Downloads\Test\server.py", line 54, in pair
completion = await chat_completion(messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Bob\Downloads\Test\utils.py", line 34, in chat_completion
return response_json["choices"][0]["message"]["content"]
~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'choices'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.