add: 增加lmstudio chat api接口逻辑

This commit is contained in:
taylor
2024-10-14 17:23:13 +08:00
parent 3ce7b4efe7
commit c03be10fc1
4 changed files with 4 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.11 (maubot-llmplus)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="maubot-llm-conda" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

2
.idea/misc.xml generated
View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (maubot-llmplus)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="maubot-llm-conda" project-jdk-type="Python SDK" />
</project>

View File

@@ -2,7 +2,7 @@ allowed_users: []
use_platform: local_ai
name: "ollama"
name: "ai bot"
reply_in_thread: true

View File

@@ -109,7 +109,7 @@ class Anthropic(Platform):
async def list_models(self) -> List[str]:
# 由于没有列出所有支持的模型的api所有只能写死在代码中
models = ["Claude 3.5 Opus", "Claude 3.5 Sonnet", "Claude 3.5 Haiku", "Claude 3 Opus", "Claude 3 Sonnet ", "Claude 3 Haiku"]
models = ["claude-3-5-sonnet-20240620", "claude-3-opus-20240229 ", "claude-3-sonnet-20240229", "claude-3-haiku-20240307"]
return [f"- {m}" for m in models]
def get_type(self) -> str: