some changes

This commit is contained in:
Shivering Ocelot committed 2026-01-09 18:09:30 -05:00
1 parent cccdb7d231
commit a3700ca15a
7 files changed
+36 -12

No files matched your search

+5
View File
@@ -5,6 +5,11 @@ from sqlalchemy.sql.expression import select
from tortoise import fields, models, Tortoise
import asyncio
# These types don't represent all objects in Horde.
# Agents and Chats can be created for just a session, in which case, they
# are not saved on the database, as aren't all their associated values of
# other classes.
class Base(DeclarativeBase):
pass
+6 -3
View File
@@ -1,4 +1,5 @@
import threading
import ollama
from stream import Stream
@@ -18,13 +19,15 @@ class Models:
qwen3_8b = "lucataco/qwen3-vl-8b-instruct:39e893666996acf464cff75688ad49ac95ef54e9f1c688fbc677330acc478e11"
qwen3_235b = "qwen/qwen3-235b-a22b-instruct-2507"
async def ollama_chat_completion(app, messages, model, opts={}):
from ollama import AsyncClient
async def ollama_list(app, messages, model, opts={}):
# TODO: test the output, and use this
return ollama.list()
async def ollama_chat_completion(app, messages, model, opts={}):
content_stream = Stream(app)
print("START OLLAMA INFERENCE")
stream_response = await AsyncClient().chat(
stream_response = await ollama.AsyncClient().chat(
model=model,
messages=[{'role': msg.role, 'content': msg.content} for msg in messages],
stream=True,
+6
View File
@@ -133,6 +133,12 @@ def start_server(app):
body = req.get('body', {})
nonce = req.get('nonce', None)
def get_agent_id ():
raise Exception("Cannot get agent id")
def get_chat_id ():
raise Exception("Cannot get chat id")
if action == "ping":
await send({'message': "pong"})
+1
View File
@@ -48,6 +48,7 @@
--border-radius: 6px;
--section-gap: 160px;
--header-height: 4em;
}
/* Z-Index hierarchy */
+1 -1
View File
@@ -23,7 +23,7 @@ main {
}
.main-header {
height: 3em;
height: var(--header-height);
border-bottom: 1px solid var(--color-border);
display: flex;
flex-direction: row;
+9 -1
View File
@@ -8,8 +8,9 @@
<template>
<header class="main-header">
<button class="when-sidebar-collapsed" @click="sidebarExpand()">
<button class="header-button when-sidebar-collapsed" @click="sidebarExpand()">
>>
<!--i class="fa-solid fa-angles-right"></i-->
</button>
<slot>
@@ -25,4 +26,11 @@
font-weight: bold;
padding: 0 0.4em;
}
.header-button {
height: var(--header-height);
width: var(--header-height);
background-color: none;
border: none;
}
</style>
+8 -7
View File
@@ -92,8 +92,9 @@
</div>
</div>
<div class="tab-group">
<button class="header-button">
<i class="fa-solid fa-angles-left" @click="sidebarExpanded=false;"></i>
<button class="header-button" @click="sidebarExpanded=false;">
<!--i class="fa-solid fa-angles-left"></i-->
<<
</button>
</div>
</div>
@@ -124,8 +125,8 @@
justify-content: space-around;
align-items: center;
list-style-type: none;
height: 3em;
width: 3em;
height: var(--header-height);
width: var(--header-height);
padding-top: 3px;
color: var(--color-text-mute);
@@ -193,9 +194,9 @@
}
.header-button {
height: 3em;
width: 3em;
border-radius: 1.5em;
height: var(--header-height);
width: var(--header-height);
/*border-radius: 1.5em;*/
background-color: none;
border: none;
}