Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Administrator
/
chatgpt.ai-pro.org
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
3
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c954a68a
authored
2023-10-23 16:37:36 +0800
by
Jonille Arreglo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
28594_usage_tracking
1 parent
27441a3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
index.js
package.json
index.js
View file @
c954a68
...
...
@@ -5,6 +5,46 @@ const cors = require('cors')
require
(
'dotenv'
).
config
()
const
rateLimit
=
require
(
'express-rate-limit'
)
const
anchorme
=
require
(
"anchorme"
).
default
;
const
tiktoken
=
require
(
'@dqbd/tiktoken'
);
const
tiktokenModels
=
[
'text-davinci-003'
,
'text-davinci-002'
,
'text-davinci-001'
,
'text-curie-001'
,
'text-babbage-001'
,
'text-ada-001'
,
'davinci'
,
'curie'
,
'babbage'
,
'ada'
,
'code-davinci-002'
,
'code-davinci-001'
,
'code-cushman-002'
,
'code-cushman-001'
,
'davinci-codex'
,
'cushman-codex'
,
'text-davinci-edit-001'
,
'code-davinci-edit-001'
,
'text-embedding-ada-002'
,
'text-similarity-davinci-001'
,
'text-similarity-curie-001'
,
'text-similarity-babbage-001'
,
'text-similarity-ada-001'
,
'text-search-davinci-doc-001'
,
'text-search-curie-doc-001'
,
'text-search-babbage-doc-001'
,
'text-search-ada-doc-001'
,
'code-search-babbage-code-001'
,
'code-search-ada-code-001'
,
'gpt2'
,
'gpt-4'
,
'gpt-4-0314'
,
'gpt-4-32k'
,
'gpt-4-32k-0314'
,
'gpt-3.5-turbo'
,
'gpt-3.5-turbo-0301'
];
const
encoding_for_model
=
tiktoken
.
encoding_for_model
;
// Open AI Configuration
// console.log(process.env.OPENAI_API_ORG)
...
...
package.json
View file @
c954a68
...
...
@@ -9,6 +9,7 @@
"author"
:
""
,
"license"
:
"ISC"
,
"dependencies"
:
{
"@dqbd/tiktoken"
:
"^1.0.7"
,
"anchorme"
:
"^2.1.2"
,
"body-parser"
:
"^1.20.1"
,
"cors"
:
"^2.8.5"
,
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment