Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
e01b3c26
Commit
e01b3c26
authored
Oct 30, 2023
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回退
parent
ddd87bb2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
58 deletions
+6
-58
pom.xml
haoban-manage3-wx/pom.xml
+0
-35
ContentThirdController.java
...manage/web/controller/content/ContentThirdController.java
+4
-16
spring-servlet.xml
haoban-manage3-wx/src/main/webapp/WEB-INF/spring-servlet.xml
+0
-2
web.xml
haoban-manage3-wx/src/main/webapp/WEB-INF/web.xml
+2
-5
No files found.
haoban-manage3-wx/pom.xml
View file @
e01b3c26
...
...
@@ -37,41 +37,6 @@
</dependencyManagement>
<dependencies>
<dependency>
<groupId>
com.azure
</groupId>
<artifactId>
azure-ai-openai
</artifactId>
<version>
1.0.0-beta.5
</version>
<exclusions>
<exclusion>
<artifactId>
jackson-core
</artifactId>
<groupId>
com.fasterxml.jackson.core
</groupId>
</exclusion>
<exclusion>
<artifactId>
jackson-annotations
</artifactId>
<groupId>
com.fasterxml.jackson.core
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.fasterxml.jackson.core
</groupId>
<artifactId>
jackson-core
</artifactId>
<version>
2.10.0
</version>
</dependency>
<dependency>
<groupId>
com.fasterxml.jackson.core
</groupId>
<artifactId>
jackson-annotations
</artifactId>
<version>
2.10.0
</version>
</dependency>
<dependency>
<groupId>
com.fasterxml.jackson.core
</groupId>
<artifactId>
jackson-databind
</artifactId>
<version>
2.10.0
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
open-ai-sdk
</artifactId>
<version>
${open-ai-sdk}
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.11
</version>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/ContentThirdController.java
View file @
e01b3c26
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
content
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.clerk.api.dto.AuthorizedUser
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.content.api.dto.aigc.AIGCContent
;
...
...
@@ -9,12 +8,13 @@ import com.gic.content.api.qdto.aigc.ContentAIGCQDTO;
import
com.gic.content.api.qdto.aigc.ContentAiLogDTO
;
import
com.gic.content.api.service.common.ThirdApiService
;
import
com.gic.haoban.manage.web.qo.content.ContentAIGCQO
;
import
com.open.ai.OpenAIUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.servlet.mvc.method.annotation.SseEmitter
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
...
...
@@ -48,18 +48,6 @@ public class ContentThirdController {
}
/**
* openAI会话
* @param question
* @return
*/
@RequestMapping
(
value
=
"/ai/chat"
,
method
=
RequestMethod
.
GET
,
produces
=
"text/event-stream;charset=UTF-8"
)
public
SseEmitter
openAiChat
(
String
question
,
String
userId
,
String
enterpriseId
)
{
SseEmitter
emitter
=
new
SseEmitter
(
30000L
);
OpenAIUtil
.
chat
(
emitter
,
question
,
userId
,
enterpriseId
);
return
emitter
;
}
/**
* OpenAi日志列表
* @return
*/
...
...
haoban-manage3-wx/src/main/webapp/WEB-INF/spring-servlet.xml
View file @
e01b3c26
...
...
@@ -37,7 +37,6 @@
<list>
<value>
text/html;charset=UTF-8
</value>
<value>
application/x-www-form-urlencoded;charset=UTF-8
</value>
<value>
text/plain;charset=UTF-8
</value>
<!--默认是 iso-8859-1 -->
</list>
</property>
...
...
@@ -55,7 +54,6 @@
<list>
<value>
text/html;charset=UTF-8
</value>
<value>
application/x-www-form-urlencoded;charset=UTF-8
</value>
<value>
text/plain;charset=UTF-8
</value>
<!--默认是 iso-8859-1 -->
</list>
</property>
...
...
haoban-manage3-wx/src/main/webapp/WEB-INF/web.xml
View file @
e01b3c26
<?xml version="1.0" encoding="UTF-8"?>
<web-app
version=
"
3.0
"
xmlns=
"http://java.sun.com/xml/ns/javaee"
<web-app
version=
"
2.5
"
xmlns=
"http://java.sun.com/xml/ns/javaee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_
3_0
.xsd"
>
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_
2_5
.xsd"
>
<display-name>
Archetype Created Web Application
</display-name>
<context-param>
...
...
@@ -23,7 +23,6 @@
<param-value>
/WEB-INF/spring-*.xml
</param-value>
</init-param>
<load-on-startup>
2
</load-on-startup>
<async-supported>
true
</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>
spring
</servlet-name>
...
...
@@ -40,7 +39,6 @@
<filter-mapping>
<filter-name>
encodingFilter
</filter-name>
<url-pattern>
/*
</url-pattern>
<dispatcher>
ASYNC
</dispatcher>
</filter-mapping>
<filter>
...
...
@@ -50,6 +48,5 @@
<filter-mapping>
<filter-name>
springSessionRepositoryFilter
</filter-name>
<url-pattern>
/*
</url-pattern>
<dispatcher>
ASYNC
</dispatcher>
</filter-mapping>
</web-app>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment