refactor: cleanup
This commit is contained in:
@@ -51,10 +51,6 @@ class AiBase:
|
|||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
try:
|
|
||||||
raise Exception()
|
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
del self.model
|
del self.model
|
||||||
del self.tokenizer
|
del self.tokenizer
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ class Server:
|
|||||||
|
|
||||||
if json_body['command'] == 'chat':
|
if json_body['command'] == 'chat':
|
||||||
bot = self._server.get_bot(json_body['modelId'])
|
bot = self._server.get_bot(json_body['modelId'])
|
||||||
print(bot)
|
|
||||||
bot.ensure_loaded()
|
bot.ensure_loaded()
|
||||||
response = bot.generate(json_body['messages'],
|
response = bot.generate(json_body['messages'],
|
||||||
token_count=json_body['tokenCount'],
|
token_count=json_body['tokenCount'],
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ export default defineConfig({
|
|||||||
'^/api/.*$': {
|
'^/api/.*$': {
|
||||||
target: 'http://localhost:5172',
|
target: 'http://localhost:5172',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
}, '^/ws/.*$': {
|
},
|
||||||
|
'^/ws/.*$': {
|
||||||
target: 'http://localhost:5172',
|
target: 'http://localhost:5172',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
ws: true,
|
ws: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user