mirror of
https://github.com/vegu-ai/talemate.git
synced 2025-12-16 11:47:48 +01:00
Prep 0.13.2 (#33)
* fix issue with client removal * client type not editable after creation (keeps things simple) * fixes issue with openai client bugging out (api_url not set) * fix issues with edit client not reflecting changes to UX * 0.13.2
This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api"
|
|||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "talemate"
|
name = "talemate"
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
description = "AI-backed roleplay and narrative tools"
|
description = "AI-backed roleplay and narrative tools"
|
||||||
authors = ["FinalWombat"]
|
authors = ["FinalWombat"]
|
||||||
license = "GNU Affero General Public License v3.0"
|
license = "GNU Affero General Public License v3.0"
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ from .agents import Agent
|
|||||||
from .client import TextGeneratorWebuiClient
|
from .client import TextGeneratorWebuiClient
|
||||||
from .tale_mate import *
|
from .tale_mate import *
|
||||||
|
|
||||||
VERSION = "0.13.1"
|
VERSION = "0.13.2"
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class Agent(ABC):
|
|||||||
if not getattr(self.client, "enabled", True):
|
if not getattr(self.client, "enabled", True):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if self.client.current_status in ["error", "warning"]:
|
if self.client and self.client.current_status in ["error", "warning"]:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return self.client is not None
|
return self.client is not None
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class ClientBase:
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
api_url: str,
|
api_url: str = None,
|
||||||
name = None,
|
name = None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
|
|||||||
@@ -167,11 +167,16 @@ class WebsocketHandler(Receiver):
|
|||||||
log.info("Configuring clients", clients=clients)
|
log.info("Configuring clients", clients=clients)
|
||||||
|
|
||||||
for client in clients:
|
for client in clients:
|
||||||
|
|
||||||
|
client.pop("status", None)
|
||||||
|
|
||||||
if client["type"] in ["textgenwebui", "lmstudio"]:
|
if client["type"] in ["textgenwebui", "lmstudio"]:
|
||||||
try:
|
try:
|
||||||
max_token_length = int(client.get("max_token_length", 2048))
|
max_token_length = int(client.get("max_token_length", 2048))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
client.pop("model", None)
|
||||||
|
|
||||||
self.llm_clients[client["name"]] = {
|
self.llm_clients[client["name"]] = {
|
||||||
"type": client["type"],
|
"type": client["type"],
|
||||||
@@ -180,6 +185,10 @@ class WebsocketHandler(Receiver):
|
|||||||
"max_token_length": max_token_length,
|
"max_token_length": max_token_length,
|
||||||
}
|
}
|
||||||
elif client["type"] == "openai":
|
elif client["type"] == "openai":
|
||||||
|
|
||||||
|
client.pop("model_name", None)
|
||||||
|
client.pop("apiUrl", None)
|
||||||
|
|
||||||
self.llm_clients[client["name"]] = {
|
self.llm_clients[client["name"]] = {
|
||||||
"type": "openai",
|
"type": "openai",
|
||||||
"name": client["name"],
|
"name": client["name"],
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<v-container>
|
<v-container>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="6">
|
<v-col cols="6">
|
||||||
<v-select v-model="client.type" :items="['openai', 'textgenwebui', 'lmstudio']" label="Client Type"></v-select>
|
<v-select v-model="client.type" :disabled="!typeEditable()" :items="['openai', 'textgenwebui', 'lmstudio']" label="Client Type"></v-select>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="6">
|
<v-col cols="6">
|
||||||
<v-text-field v-model="client.name" label="Client Name"></v-text-field>
|
<v-text-field v-model="client.name" label="Client Name"></v-text-field>
|
||||||
@@ -68,6 +68,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
typeEditable() {
|
||||||
|
return this.state.formTitle === 'Add Client';
|
||||||
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$emit('update:dialog', false);
|
this.$emit('update:dialog', false);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user