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
ded96b59
Commit
ded96b59
authored
Dec 05, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
3f884dbb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
YHAIRequestManager.swift
...s/Modules/AI/AI-Dialogue(AI对话)/C/YHAIRequestManager.swift
+1
-1
YHAIRobotChatViewController.swift
.../AI/AI-Dialogue(AI对话)/C/YHAIRobotChatViewController.swift
+4
-0
YHAIMessageModel.swift
...ses/Modules/AI/AI-Dialogue(AI对话)/M/YHAIMessageModel.swift
+8
-0
No files found.
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIRequestManager.swift
View file @
ded96b59
...
@@ -225,7 +225,7 @@ class YHAIRequestManager: NSObject {
...
@@ -225,7 +225,7 @@ class YHAIRequestManager: NSObject {
// 一段话结束需要重新生成uuid 来
// 一段话结束需要重新生成uuid 来
self
.
uuid
=
UUID
()
.
uuidString
+
NSDate
()
.
timeIntervalSince1970
.
description
self
.
uuid
=
UUID
()
.
uuidString
+
NSDate
()
.
timeIntervalSince1970
.
description
}
}
if
!
receiveMessage
.
body
.
isStart
()
&&
!
receiveMessage
.
isCompleted
()
{
if
!
receiveMessage
.
isNotUserfulMessage
()
{
completion
?(
receiveMessage
,
sessionDone
)
completion
?(
receiveMessage
,
sessionDone
)
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIRobotChatViewController.swift
View file @
ded96b59
...
@@ -161,9 +161,13 @@ class YHAIRobotChatViewController: YHBaseViewController {
...
@@ -161,9 +161,13 @@ class YHAIRobotChatViewController: YHBaseViewController {
// isPull 是否是下拉组件触发
// isPull 是否是下拉组件触发
func
getHistoryMessages
(
_
isPull
:
Bool
)
{
func
getHistoryMessages
(
_
isPull
:
Bool
)
{
if
!
isPull
{
if
!
isPull
{
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
}
else
{
printLog
(
"PULL MESSAGE HISTORY"
)
}
}
viewModel
.
getHistoryChatMessages
(
botId
:
robotId
,
conversationId
:
conversationId
,
messageId
:
historyLastMessageId
)
{
viewModel
.
getHistoryChatMessages
(
botId
:
robotId
,
conversationId
:
conversationId
,
messageId
:
historyLastMessageId
)
{
[
weak
self
]
success
,
error
in
[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
YHHUD
.
hide
()
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/M/YHAIMessageModel.swift
View file @
ded96b59
...
@@ -132,6 +132,14 @@ class YHAIChatMessage: CustomStringConvertible {
...
@@ -132,6 +132,14 @@ class YHAIChatMessage: CustomStringConvertible {
return
""
return
""
}
}
//
func
isNotUserfulMessage
()
->
Bool
{
if
!
self
.
body
.
isStart
()
&&
!
self
.
isCompleted
()
&&
!
self
.
body
.
isDone
()
{
return
true
}
return
false
}
// 获取消息类型
// 获取消息类型
func
getType
()
->
YHAIMessageType
{
func
getType
()
->
YHAIMessageType
{
if
let
contentType
=
dataDict
[
"contentType"
]
as?
Int
{
if
let
contentType
=
dataDict
[
"contentType"
]
as?
Int
{
...
...
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