+
80
-

vue3中如何使用axios来直接请求chatgpt官方api接口进行问答?

vue3中如何使用axios来直接请求chatgpt官方api接口进行问答?


网友回复

+
0
-

import {  getCurrentInstance } from 'vue';

const { proxy } = getCurrentInstance()
proxy.$http.post("https://api.openai.com/v1/chat/completions", {
      model: 'gpt-3.5-turbo',
      messages: [
       ...

点击查看剩余70%

我知道答案,我要回答