MCPcopy Create free account
hub / github.com/echoVic/blade-code / sendMessage

Function sendMessage

src/llm/BaseLLM.ts:92–104  ·  view source on GitHub ↗

* 便捷方法:发送单条消息

(
    content: string,
    role: 'user' | 'system' = 'user',
    options?: Partial<LLMRequest>
  )

Source from the content-addressed store, hash-verified

90 * 便捷方法:发送单条消息
91 */
92 public async sendMessage(
93 content: string,
94 role: 'user' | 'system' = 'user',
95 options?: Partial<LLMRequest>
96 ): Promise<string> {
97 const request: LLMRequest = {
98 messages: [{ role, content }],
99 ...options,
100 };
101
102 const response = await this.chat(request);
103 return response.content;
104 }
105
106 /**
107 * 便捷方法:多轮对话

Callers

nothing calls this directly

Calls 1

chatMethod · 0.45

Tested by

no test coverage detected