mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-08-11 11:16:18 +08:00
13 lines
434 B
JavaScript
13 lines
434 B
JavaScript
import { generateAnswersWithChatgptApiCompat } from './openai-api.mjs'
|
|
|
|
/**
|
|
* @param {Browser.Runtime.Port} port
|
|
* @param {string} question
|
|
* @param {Session} session
|
|
* @param {string} apiKey
|
|
*/
|
|
export async function generateAnswersWithMoonshotCompletionApi(port, question, session, apiKey) {
|
|
const baseUrl = 'https://api.moonshot.cn/v1'
|
|
return generateAnswersWithChatgptApiCompat(baseUrl, port, question, session, apiKey)
|
|
}
|