Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
exam_master
Project
Project
Details
Activity
Releases
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
ai-tech
exam_master
Commits
d6442497
Commit
d6442497
authored
Oct 09, 2024
by
陈立彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改配置
parent
f4011a95
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
ExamAppFacade.java
src/main/java/cn/aibreeze/exam/facade/ExamAppFacade.java
+3
-3
application.yml
src/main/resources/application.yml
+2
-2
No files found.
src/main/java/cn/aibreeze/exam/facade/ExamAppFacade.java
View file @
d6442497
...
...
@@ -22,7 +22,7 @@ public class ExamAppFacade {
@Value
(
"${dify.api_base:https://ai-api.tech.breezeai.cn/v1}"
)
private
String
difyBase
;
@Value
(
"${dify.api_key:app-
yaoa2lAMGJzB11ZGxd5P4iTQ
}"
)
@Value
(
"${dify.api_key:app-
ilgoEphXjLw0I7x7fGeCyKYk
}"
)
private
String
apiKey
;
private
final
RestTemplate
restTemplate
=
new
RestTemplate
();
...
...
@@ -44,8 +44,8 @@ public class ExamAppFacade {
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
headers
.
setBearerAuth
(
apiKey
);
log
.
info
(
"异步请求参数,sessionId = {}"
,
sessionId
);
log
.
info
(
"异步请求参数,req = {}"
,
JSONObject
.
toJSONString
(
param
));
log
.
info
(
"异步请求参数
1
,sessionId = {}"
,
sessionId
);
log
.
info
(
"异步请求参数
2
,req = {}"
,
JSONObject
.
toJSONString
(
param
));
HttpEntity
<
String
>
postEntity
=
new
HttpEntity
<>(
param
.
toJSONString
(),
headers
);
ResponseEntity
<
String
>
response
=
restTemplate
.
postForEntity
(
difyBase
+
"/chat-messages"
,
postEntity
,
String
.
class
);
log
.
info
(
"执行结果:"
,
JSONObject
.
parseObject
(
response
.
getBody
()));
...
...
src/main/resources/application.yml
View file @
d6442497
...
...
@@ -99,5 +99,5 @@ minio-file:
download-url-prefix
:
http://minio:9000/
dify
:
api_base
:
http://dify-api-ga.tech:5001/v1
api_key
:
app-yaoa2lAMGJzB11ZGxd5P4iTQ
\ No newline at end of file
api_base
:
http://dify-api:5001/v1
api_key
:
app-ilgoEphXjLw0I7x7fGeCyKYk
\ No newline at end of file
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