Update go.mod, update gpt avatar

This commit is contained in:
Yang Luo 2023-09-09 00:20:27 +08:00
parent bcdf30f53f
commit 078cdba1e8
3 changed files with 4 additions and 5 deletions

2
go.mod
View File

@ -13,6 +13,7 @@ require (
github.com/denisenkom/go-mssqldb v0.10.0
github.com/go-sql-driver/mysql v1.6.0
github.com/google/uuid v1.3.0
github.com/henomis/lingoose v0.0.11-alpha1
github.com/lib/pq v1.10.2
github.com/muesli/clusters v0.0.0-20200529215643-2700303c1762
github.com/muesli/kmeans v0.3.0
@ -49,7 +50,6 @@ require (
github.com/gomodule/redigo v2.0.0+incompatible // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/henomis/lingoose v0.0.11-alpha1 // indirect
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect

1
go.sum
View File

@ -1260,7 +1260,6 @@ modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
modernc.org/z v1.0.1/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA=
modernc.org/z v1.5.1 h1:RTNHdsrOpeoSeOF4FbzTo8gBYByaJ5xT7NgZ9ZqRiJM=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=

View File

@ -16,7 +16,7 @@ import React from "react";
import {Avatar, ChatContainer, ConversationHeader, MainContainer, Message, MessageInput, MessageList} from "@chatscope/chat-ui-kit-react";
import "@chatscope/chat-ui-kit-styles/dist/default/styles.min.css";
const robot = "https://cdn.casbin.org/img/social_openai.svg";
const aiAvatar = "https://cdn.casbin.com/casdoor/static/gpt.png";
class ChatBox extends React.Component {
constructor(props) {
@ -36,7 +36,7 @@ class ChatBox extends React.Component {
<MainContainer style={{display: "flex", width: "100%", height: "100%"}} >
<ChatContainer style={{display: "flex", width: "100%", height: "100%"}}>
<ConversationHeader>
<Avatar src={robot} name="AI" />
<Avatar src={aiAvatar} name="AI" />
<ConversationHeader.Content userName="AI" />
</ConversationHeader>
<MessageList>
@ -47,7 +47,7 @@ class ChatBox extends React.Component {
sender: message.name,
direction: message.author === "AI" ? "incoming" : "outgoing",
}} avatarPosition={message.author === "AI" ? "tl" : "tr"}>
<Avatar src={message.author === "AI" ? robot : this.props.account.avatar} name="GPT" />
<Avatar src={message.author === "AI" ? aiAvatar : this.props.account.avatar} name="GPT" />
</Message>
))}
</MessageList>