strapi-plugin-open-ai icon indicating copy to clipboard operation
strapi-plugin-open-ai copied to clipboard

添加baseurl配置

Open jianhuatu opened this issue 5 months ago • 0 comments

const response = await fetch(${strapi .plugin('open-ai') .config('BASE_URL')}/v1/completions, { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: Bearer ${strapi .plugin('open-ai') .config('API_TOKEN')}, }, body: JSON.stringify({ model, prompt, temperature, max_tokens: maxTokens }), });

jianhuatu avatar Jan 24 '24 16:01 jianhuatu