# chatgptservice **Repository Path**: zcxnll_admin/chatgptservice ## Basic Information - **Project Name**: chatgptservice - **Description**: 后端项目对接chatgpt,暂无前端 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2023-07-31 - **Last Updated**: 2023-07-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 实现chatgpt对接后端 - 需要科学上网 ## 实现功能 基于cahtgpt的AI对话助手 - 创建一个对话 - 对话名称 - 角色指令 - 对话id - 聊天表 ```sql create table chat ( id bigint auto_increment comment 'id' primary key, conversionid bigint null comment '对话id', context varchar(1024) null comment 'chatgpt内容', role varchar(20) null comment 'user or assistant', createdTime timestamp default CURRENT_TIMESTAMP not null comment '创建时间', updatedTime timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间', isDelete tinyint(1) default 0 not null comment '是否删除' ) comment '对话表'; ``` - 对话表 ```sql create table conversion ( id bigint auto_increment comment 'id' primary key, title varchar(255) null comment '对话标题', instructions varchar(512) null comment '该对话的角色指令', updatedTime timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间', isDelete tinyint(1) default 0 not null comment '是否删除', createdTime timestamp default CURRENT_TIMESTAMP not null comment '创建时间' ); ``` ## 使用说明 - 新建对话 - 建立websocket连接