Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
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
mobile-group
galaxy-iOS
Commits
134fc51b
Commit
134fc51b
authored
Dec 10, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
ae31c27f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
YHAIMainChatViewController.swift
...s/AI/AI-Dialogue(AI对话)/C/YHAIMainChatViewController.swift
+5
-1
YHAIListModel.swift
...lasses/Modules/AI/AI-Dialogue(AI对话)/M/YHAIListModel.swift
+1
-1
tab_ai.json
galaxy/galaxy/Res/jsons/tab_ai/tab_ai.json
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIMainChatViewController.swift
View file @
134fc51b
...
@@ -16,6 +16,7 @@ class YHAIMainChatViewController: YHBaseViewController {
...
@@ -16,6 +16,7 @@ class YHAIMainChatViewController: YHBaseViewController {
var
robotId
:
String
=
""
var
robotId
:
String
=
""
var
conversationId
:
String
=
""
var
conversationId
:
String
=
""
var
isNeedAutoResponseImage
=
false
var
isNeedAutoResponseImage
=
false
var
isHaveAutoResponseText
=
false
var
messages
:[
YHAIChatMessage
]
=
[]
var
messages
:[
YHAIChatMessage
]
=
[]
var
isUserScrolling
:
Bool
=
false
var
isUserScrolling
:
Bool
=
false
...
@@ -101,6 +102,8 @@ class YHAIMainChatViewController: YHBaseViewController {
...
@@ -101,6 +102,8 @@ class YHAIMainChatViewController: YHBaseViewController {
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
super
.
viewWillAppear
(
animated
)
autoResponseTextMessage
()
}
}
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
...
@@ -183,7 +186,8 @@ class YHAIMainChatViewController: YHBaseViewController {
...
@@ -183,7 +186,8 @@ class YHAIMainChatViewController: YHBaseViewController {
}
}
func
autoResponseTextMessage
()
{
func
autoResponseTextMessage
()
{
if
messages
.
count
<=
0
{
if
messages
.
count
<=
0
||
!
isHaveAutoResponseText
{
isHaveAutoResponseText
=
true
let
text
=
"您好,我是港小宝,为新中产提供一站式服务。您有香港身份和生活的问题,可以咨询我~"
let
text
=
"您好,我是港小宝,为新中产提供一站式服务。您有香港身份和生活的问题,可以咨询我~"
let
msg
=
self
.
chatConfig
.
createRobotResponseTextMessage
(
text
)
let
msg
=
self
.
chatConfig
.
createRobotResponseTextMessage
(
text
)
messages
.
append
(
msg
)
messages
.
append
(
msg
)
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/M/YHAIListModel.swift
View file @
134fc51b
...
@@ -23,7 +23,7 @@ enum YHAIRobotType: String {
...
@@ -23,7 +23,7 @@ enum YHAIRobotType: String {
case
main
=
"mainBot"
case
main
=
"mainBot"
case
education
=
"educationBot"
case
education
=
"educationBot"
case
sale
=
"saleBot"
case
sale
=
"saleBot"
case
image
=
"
E
ntryPrecautionsImage"
case
image
=
"
e
ntryPrecautionsImage"
}
}
class
YHEntranceconfigModel
:
SmartCodable
{
class
YHEntranceconfigModel
:
SmartCodable
{
...
...
galaxy/galaxy/Res/jsons/tab_ai/tab_ai.json
View file @
134fc51b
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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