Merge remote-tracking branch 'origin/main' into agent-demo
This commit is contained in:
commit
87525721e2
@ -172,6 +172,7 @@ class GraphDatabase:
|
|||||||
def read_triples(file_path):
|
def read_triples(file_path):
|
||||||
with open(file_path, 'r', encoding='utf-8') as file:
|
with open(file_path, 'r', encoding='utf-8') as file:
|
||||||
for line in file:
|
for line in file:
|
||||||
|
if line.strip():
|
||||||
yield json.loads(line.strip())
|
yield json.loads(line.strip())
|
||||||
|
|
||||||
triples = list(read_triples(file_path))
|
triples = list(read_triples(file_path))
|
||||||
|
|||||||
@ -61,7 +61,7 @@ class OpenModel(OpenAIBase):
|
|||||||
class CustomModel(OpenAIBase):
|
class CustomModel(OpenAIBase):
|
||||||
def __init__(self, model_info):
|
def __init__(self, model_info):
|
||||||
model_name = model_info["name"]
|
model_name = model_info["name"]
|
||||||
api_key = model_info.get("api_key", "custom_model")
|
api_key = model_info.get("api_key") or "custom_model"
|
||||||
base_url = get_docker_safe_url(model_info["api_base"])
|
base_url = get_docker_safe_url(model_info["api_base"])
|
||||||
logger.info(f"> Custom model: {model_name}, base_url: {base_url}")
|
logger.info(f"> Custom model: {model_name}, base_url: {base_url}")
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,7 @@
|
|||||||
@click="handleChange('model_provider', 'custom'); handleChange('model_name', item.custom_id)"
|
@click="handleChange('model_provider', 'custom'); handleChange('model_name', item.custom_id)"
|
||||||
>
|
>
|
||||||
<div class="card-models__header">
|
<div class="card-models__header">
|
||||||
<div class="name">{{ item.name }}</div>
|
<div class="name" :title="item.name">{{ item.name }}</div>
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
title="确认删除该模型?"
|
title="确认删除该模型?"
|
||||||
@ -704,11 +704,33 @@ const sendRestart = () => {
|
|||||||
.name {
|
.name {
|
||||||
color: var(--gray-1000);
|
color: var(--gray-1000);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 8px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
content: attr(title);
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0.8);
|
||||||
|
color: white;
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
white-space: nowrap;
|
||||||
|
z-index: 1000;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.action {
|
.action {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
flex-shrink: 0;
|
||||||
button {
|
button {
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'^/api': {
|
'^/api': {
|
||||||
target: env.VITE_API_URL || 'http://localhost:5050',
|
target: env.VITE_API_URL || 'http://127.0.0.1:5050',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, '')
|
rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user