Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-chatgpt-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
koishi-plugin-chatgpt-api
Commits
062a2c08
Commit
062a2c08
authored
Feb 11, 2023
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix appel
parent
1299b373
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/index.tsx
src/index.tsx
+5
-4
No files found.
src/index.tsx
View file @
062a2c08
...
...
@@ -83,11 +83,12 @@ export default class ChatGPTApiPlugin
@
UseMiddleware
()
middleware
(
session
:
Session
,
next
:
Next
)
{
if
(
(
!
this
.
config
.
prefix
.
length
&&
session
.
content
)
||
session
.
parsed
?.
appel
)
if
(
session
.
parsed
?.
appel
)
{
return
this
.
handle
(
session
,
session
.
parsed
.
content
);
}
if
(
!
this
.
config
.
prefix
.
length
&&
session
.
content
)
{
return
this
.
handle
(
session
,
session
.
content
);
}
const
matchingPrefix
=
this
.
config
.
prefix
.
find
((
prefix
)
=>
session
.
content
.
startsWith
(
prefix
),
);
...
...
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