Skip to content

Commit

Permalink
🐛 Fix(custom): remove timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuingsmile committed May 31, 2023
1 parent 982c382 commit ddf6f05
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@element-plus/icons-vue": "^2.1.0",
"axios": "^1.4.0",
"chatgpt": "^5.2.4",
"chatgpt": "^5.2.5",
"core-js": "^3.30.2",
"dexie": "^3.2.3",
"element-plus": "^2.3.5",
Expand Down
3 changes: 1 addition & 2 deletions src/api/official.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ async function createChatCompletionStream (
let data
try {
response = await openai.createChatCompletion(requestConfig, {
proxy: proxy ?? false,
timeout: 30000
proxy: proxy ?? false
})
data = response.data
if (response.status === 200) {
Expand Down
1 change: 0 additions & 1 deletion src/api/webapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ async function createChatCompletionUnoffical (
response = await unOfficalAPI.sendMessage(
messages[0] + '\n' + messages[1],
{
timeoutMs: 30000,
onProgress: (partialResponse: ChatMessage) => {
result.value = partialResponse.text
}
Expand Down
1 change: 0 additions & 1 deletion src/pages/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,6 @@ async function continueChat () {
const response = await unOfficalAPI.sendMessage(
'continue',
{
timeoutMs: 30000,
parentMessageId: parentMessageId.value,
conversationId: conversationId.value,
onProgress: (partialResponse: ChatMessage) => {
Expand Down
26 changes: 14 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1161,11 +1161,6 @@
resolved "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==

"@dqbd/tiktoken@^1.0.7":
version "1.0.7"
resolved "https://registry.npmjs.org/@dqbd/tiktoken/-/tiktoken-1.0.7.tgz#612871cf91eba5599c804f100c573aa4d8596f57"
integrity sha512-bhR5k5W+8GLzysjk8zTMVygQZsgvf7W1F0IlL4ZQ5ugjo5rCyiwGM5d8DYriXspytfu98tv59niang3/T+FoDw==

"@element-plus/icons-vue@^2.0.6", "@element-plus/icons-vue@^2.1.0":
version "2.1.0"
resolved "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.1.0.tgz#7ad90d08a8c0d5fd3af31c4f73264ca89614397a"
Expand Down Expand Up @@ -2677,9 +2672,9 @@ balanced-match@^1.0.0:
resolved "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==

base64-js@^1.3.1:
base64-js@^1.3.1, base64-js@^1.5.1:
version "1.5.1"
resolved "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==

batch@0.6.1:
Expand Down Expand Up @@ -2946,15 +2941,15 @@ chardet@^0.7.0:
resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==

chatgpt@^5.2.4:
version "5.2.4"
resolved "https://registry.npmjs.org/chatgpt/-/chatgpt-5.2.4.tgz#9b808a830d17a0d689f2a9ad1598f1c50162479e"
integrity sha512-U53cUJ/1sEUD1+lcdW52QqbVQZOIMy3hxzYdEIhmmgZJQW/zI8C5O9ohCxXbFsbk6OtXHEBxY/0xw4Qa6twG2Q==
chatgpt@^5.2.5:
version "5.2.5"
resolved "https://registry.npmjs.org/chatgpt/-/chatgpt-5.2.5.tgz#6a9f951fd58d8501ff0384a338eacdc0e3d8544f"
integrity sha512-DNhBzPb2zTDjJADY44XfngMvsvrvHRq1md2VPXLmnKeP1UCeA1B6pV3s9ZRwlcgjVT0RyM77fRj1xj5V11Vctg==
dependencies:
"@dqbd/tiktoken" "^1.0.7"
cac "^6.7.14"
conf "^11.0.1"
eventsource-parser "^1.0.0"
js-tiktoken "^1.0.5"
keyv "^4.5.2"
p-timeout "^6.1.1"
quick-lru "^6.1.1"
Expand Down Expand Up @@ -5689,6 +5684,13 @@ js-message@1.0.7:
resolved "https://registry.npmmirror.com/js-message/-/js-message-1.0.7.tgz#fbddd053c7a47021871bb8b2c95397cc17c20e47"
integrity sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==

js-tiktoken@^1.0.5:
version "1.0.6"
resolved "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.6.tgz#f32f4b9b3c33d11f12b5cf016b3c729370817ee9"
integrity sha512-lxHntEupgjWvSh37WxpAW4XN6UBXBtFJOpZZq5HN5oNjDfN7L/iJhHOKjyL/DFtuYXUwn5jfTciLtOWpgQmHjQ==
dependencies:
base64-js "^1.5.1"

js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
Expand Down

0 comments on commit ddf6f05

Please sign in to comment.