MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / completePrompt

Method completePrompt

src/api/providers/qwen-code.ts:330–344  ·  view source on GitHub ↗
(prompt: string)

Source from the content-addressed store, hash-verified

328 }
329
330 async completePrompt(prompt: string): Promise<string> {
331 await this.ensureAuthenticated()
332 const client = this.ensureClient()
333 const model = this.getModel()
334
335 const requestOptions: OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming = {
336 model: model.id,
337 messages: [{ role: "user", content: prompt }],
338 max_completion_tokens: model.info.maxTokens,
339 }
340
341 const response = await this.callApiWithRetry(() => client.chat.completions.create(requestOptions))
342
343 return response.choices[0]?.message.content || ""
344 }
345}

Callers

nothing calls this directly

Calls 5

ensureAuthenticatedMethod · 0.95
ensureClientMethod · 0.95
getModelMethod · 0.95
callApiWithRetryMethod · 0.95
createMethod · 0.45

Tested by

no test coverage detected