基于chatgpt官方接口,实现类似官网逐字输出的打字机效果的简单例子,基于VUE和VITE,Typescript,详见文章https://juejin.cn/post/7237426124669157433
A simple case of implementing streaming and displaying content word by word, similar to the official website, using the chatGPT API interface. Developed using Vue.js and TypeScript.
-
流式传输文字
-
可控输出速度的打字机效果
-
代码块高亮/复制
-
Streaming text transfer
-
Typewriter effect with adjustable output speed
-
Code block highlighting/copying
config.ts >> key -> openai api key npm run dev