Cnllm

general MCP Server

中文大模型通用SDK,系统性优化接口适配、增强响应解析和批量处理等能力,深度适配 OpenAI 生态内 LangChain、LlamaIndex、AutoGen 等大模型应用框架。支持作为Agent Skill部署到各种AI编程工具。

Verified
generalgeneral
5 views149 stars13 forksMIT

Why This Matters

Discovered via agent-topic:autogen and last synced 3mo ago.

Verified
Source
agent-topic:autogen
Stars
149
Last synced
3mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
46
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (46)

Direction

Description

prompt

`str`/`list[str]`

top_p

`float`

Type

Scenario

EmbeddingResponse

### 2.1 Chat Completions Single Call Three calling methods are supported, with the simplest being one line of code, one parameter: **Simplified Call:** Does not support any parameters other than strings (streaming can be configured at client level with `stream=True` parameter). ```python resp = client("Introduce yourself in one sentence") ``` **Standard Call:** ```python resp = client.chat.create(prompt="Introduce yourself in one sentence", stream=True) ``` **Full Call:** ```python resp = client.chat.create( messages=[ {"role": "user", "content": "Introduce yourself in one sentence"}, {"role": "assistant", "content": "I am an intelligent assistant"}, {"role": "user", "content": "Hello"}, ] ) ``` #### 2.1.1 Non-Streaming Call ```python resp = client.chat.create( messages=[{"role": "user", "content": "Introduce yourself in one sentence"}], ) ``` #### 2.1.2 Streaming Call ```python resp = client.chat.create( prompt="Introduce yourself in one sentence", stream=True ) for chunk in resp: print(resp.still) # Real-time accumulated model response text print(resp.raw) # Complete accumulated model native response ``` #### 2.1.3 Response Access In streaming calls, access via `for` loop with **real-time accumulation** for responses or the following key fields; non-streaming calls do not support `for` iteration, and access returns complete field content:

retry_delay

`float`

input

`str`/`list[str]`

resp

`Dict`/`List[Dict]`

str

`"response content..."`

Strategy

Configuration

stream

`bool`

tool_choice

`str/dict`

top_logprobs

`int`

Dict

`{"id": "...", "choices": [...], ...}`

api_key

`str`

temperature

`float`

Category

Field Description

base_url

`str`

max_completion_tokens

`int`

frequency_penalty

`float`

max_retries

`int`

rps

`float`

messages

`list[dict]`/`list[list[dict]]`

max_tokens

`int`

logit_bias

`dict`

keep

`set/list`

requests

`list[dict]`

stop

`str/list`

stream_options

`dict`

tools

`list`

response_format

`dict`

reasoning_effort

`str`

logprobs

`bool`

max_concurrent

`int`

presence_penalty

`float`

timeout

`int`

callbacks

`list`

seed

`int`

drop_params

`str`

Vendor

Pass-through Parameters

batch_size

`int`

custom_ids

`list[str]`

Parameter

Type

model

`str`

n

`int`

stop_on_error

`bool`