From 6d79cc015ab8e9049a4b09b0d197c30aa709ef09 Mon Sep 17 00:00:00 2001
From: Cohee <18619528+Cohee1207@users.noreply.github.com>
Date: Fri, 13 Sep 2024 19:44:12 +0300
Subject: [PATCH] Add OpenAI o1
---
package-lock.json | 9 +++++----
package.json | 2 +-
public/index.html | 6 +++++-
public/script.js | 7 ++++++-
public/scripts/openai.js | 30 +++++++++++++++++++++++++++---
src/endpoints/tokenizers.js | 4 ++++
6 files changed, 48 insertions(+), 10 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index ca83e8446..abba30c5b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -46,7 +46,7 @@
"sanitize-filename": "^1.6.3",
"sillytavern-transformers": "2.14.6",
"simple-git": "^3.19.1",
- "tiktoken": "^1.0.15",
+ "tiktoken": "^1.0.16",
"vectra": "^0.2.2",
"wavefile": "^11.0.0",
"write-file-atomic": "^5.0.1",
@@ -5751,9 +5751,10 @@
"license": "MIT"
},
"node_modules/tiktoken": {
- "version": "1.0.15",
- "resolved": "https://registry.npmjs.org/tiktoken/-/tiktoken-1.0.15.tgz",
- "integrity": "sha512-sCsrq/vMWUSEW29CJLNmPvWxlVp7yh2tlkAjpJltIKqp5CKf98ZNpdeHRmAlPVFlGEbswDc6SmI8vz64W/qErw=="
+ "version": "1.0.16",
+ "resolved": "https://registry.npmjs.org/tiktoken/-/tiktoken-1.0.16.tgz",
+ "integrity": "sha512-hRcORIGF2YlAgWx3nzrGJOrKSJwLoc81HpXmMQk89632XAgURc7IeV2FgQ2iXo9z/J96fCvpsHg2kWoHcbj9fg==",
+ "license": "MIT"
},
"node_modules/timm": {
"version": "1.7.1",
diff --git a/package.json b/package.json
index 87d7fa508..99526e2f1 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
"sanitize-filename": "^1.6.3",
"sillytavern-transformers": "2.14.6",
"simple-git": "^3.19.1",
- "tiktoken": "^1.0.15",
+ "tiktoken": "^1.0.16",
"vectra": "^0.2.2",
"wavefile": "^11.0.0",
"write-file-atomic": "^5.0.1",
diff --git a/public/index.html b/public/index.html
index 6f8c87112..397781653 100644
--- a/public/index.html
+++ b/public/index.html
@@ -383,7 +383,7 @@
Max Response Length (tokens)
-
+
@@ -2611,6 +2611,10 @@
+