feat: add LangBot Space ChatCompletions requester and integrate with ModelsDialog and EmbeddingForm components

This commit is contained in:
Junyan Qin
2025-12-30 21:52:52 +08:00
parent 19f417174c
commit 197258ae91
7 changed files with 124 additions and 72 deletions
@@ -0,0 +1,17 @@
from __future__ import annotations
import typing
import openai
from . import chatcmpl
class LangBotSpaceChatCompletions(chatcmpl.OpenAIChatCompletions):
"""LangBot Space ChatCompletion API 请求器"""
client: openai.AsyncClient
default_config: dict[str, typing.Any] = {
'base_url': 'https://api.langbot.cloud/v1',
'timeout': 120,
}