GithubHelp home page GithubHelp logo

xingxin666 / chatgpt-nodejs-web Goto Github PK

View Code? Open in Web Editor NEW
51.0 2.0 11.0 128 KB

chatgpt nodejs服务,集成了ChatGLM、GPT3.5、GPT4、GPT联网、必应、Claude、百度文心一言等模型

Home Page: https://ai.jsunc.com/invite?code=SC0266D0E73C

TypeScript 98.20% Shell 1.80%
gpt bard bing chatgpt claude gpt4 midjourney openai wenxinyiyan chatglm

chatgpt-nodejs-web's Introduction

chatgpt nodejs服务

本项目集成了GPT3.5、GPT4、GPT联网、必应、Claude、百度文心一言等模型

Demo项目地址 若愚AI小助手

image

image

image

image

前置要求

Node

node 需要 `^18 版本

node -v

PNPM

如果没有安装过 pnpm

npm install pnpm -g

开发

获取openai官方api key,修改.env的相关参数,如 OPENAI_API_KEY

本地开发访问openai需要搭梯子,修改.env的相关参数,如 HTTPS_PROXY=http://127.0.0.1:7890

进入本项目文件夹执行下面命令

pnpm install
pnpm start

访问

post 请求例子

终端执行下面命令

curl -X POST -H "Content-Type: application/json" -d '{"prompt": "你是谁","modelCode": "GPT-3.5"}' http://localhost:3008/api/chat-process

modelCode可选值

ChatGLM2-6B

GPT-3.5

GPT-4

GPT_BROWSER

BING

CLAUDE

ERNIE-Bot-turbo

必应参数例子

{ "prompt": "你好","modelCode": "BING", "options":{"conversationId":"51D|BingProd|6120AEAD1A506F43373091BE999A7F0C5D096B8A0D2E19392B8391C507D0653A","convStyle":"Creative"} }

conversationId:上下文对话id,第一次请求传空,后续传第一次请求返回的conversationId值

convStyle:对话风格,可传参数 Creative:创造力的,Precise:精确的,Balanced:平衡的,不传默认是Creative

生产部署

复制整个项目文件夹到有 node 服务环境的服务器上。

执行本文件夹的 sh start.sh

image

chatgpt-nodejs-web's People

Contributors

xingxin666 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chatgpt-nodejs-web's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.