mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-05 05:16:03 +00:00
20 lines
408 B
Python
20 lines
408 B
Python
from __future__ import annotations
|
|
|
|
import typing
|
|
import openai
|
|
|
|
from . import chatcmpl
|
|
from .. import requester
|
|
from ....core import app
|
|
|
|
|
|
class LmStudioChatCompletions(chatcmpl.OpenAIChatCompletions):
|
|
"""LMStudio ChatCompletion API 请求器"""
|
|
|
|
client: openai.AsyncClient
|
|
|
|
default_config: dict[str, typing.Any] = {
|
|
'base_url': 'http://127.0.0.1:1234/v1',
|
|
'timeout': 120,
|
|
}
|