另外做了如下功能及優(yōu)化
提示
已經(jīng)購買的用戶請在webman/admin管理后臺升級
下個大版本預(yù)計支持史上最牛逼的 Midjourney 作圖功能(stable diffusion備選),價格預(yù)計從499調(diào)整為899,隨著不斷迭代完善webman/ai最終目標價格為1800,要購買的用戶可提前下單,后面升級免費,越早買越劃算
大佬請教個問題,我換了個幾個代理接口,沒有用openAI的,當我請求這些接口的時候,返回Enable JavaScript and cookies to continue,用postman去請求是正常的。請問在我們這個應(yīng)用里請求如何開啟JavaScript和cookies?
提個問:我用自己搭建的代理地址對話沒有回顯數(shù)據(jù)
做了一下比較如下
代理地址:https://proxy.jey.cn 返回的數(shù)據(jù)
array (
'max_tokens' => 2000,
'temperature' => 0.5,
'stream' => true,
'messages' =>
array (
0 =>
array (
'role' => 'assistant',
'content' => '你好,我是AI助手,請問您需要什么幫助?',
),
1 =>
array (
'role' => 'user',
'content' => '一加一',
),
),
'model' => 'gpt-3.5-turbo',
)
1b2
data: {"id":"chatcmpl-7uhYe50d5kRWtyRrXlSa2Z8a8sgNV","object":"chat.completion.chunk","created":1693748160,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}]}
data: {"id":"chatcmpl-7uhYe50d5kRWtyRrXlSa2Z8a8sgNV","object":"chat.completion.chunk","created":1693748160,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"一"},"finish_reason":null}]}
d1
data: {"id":"chatcmpl-7uhYe50d5kRWtyRrXlSa2Z8a8sgNV","object":"chat.completion.chunk","created":1693748160,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"加"},"finish_reason":null}]}
d1
data: {"id":"chatcmpl-7uhYe50d5kRWtyRrXlSa2Z8a8sgNV","object":"chat.completion.chunk","created":1693748160,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"一"},"finish_reason":null}]}
d1
data: {"id":"chatcmpl-7uhYe50d5kRWtyRrXlSa2Z8a8sgNV","object":"chat.completion.chunk","created":1693748160,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"等"},"finish_reason":null}]}
d1
data: {"id":"chatcmpl-7uhYe50d5kRWtyRrXlSa2Z8a8sgNV","object":"chat.completion.chunk","created":1693748160,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"于"},"finish_reason":null}]}
d1
data: {"id":"chatcmpl-7uhYe50d5kRWtyRrXlSa2Z8a8sgNV","object":"chat.completion.chunk","created":1693748160,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"二"},"finish_reason":null}]}
d1
data: {"id":"chatcmpl-7uhYe50d5kRWtyRrXlSa2Z8a8sgNV","object":"chat.completion.chunk","created":1693748160,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"。"},"finish_reason":null}]}
d2
data: {"id":"chatcmpl-7uhYe50d5kRWtyRrXlSa2Z8a8sgNV","object":"chat.completion.chunk","created":1693748160,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: [DONE]
0
我自己搭建的代理地址返回的數(shù)據(jù):
array (
'max_tokens' => 2000,
'temperature' => 0.5,
'stream' => true,
'messages' =>
array (
0 =>
array (
'role' => 'assistant',
'content' => '你好,我是AI助手,請問您需要什么幫助?',
),
1 =>
array (
'role' => 'user',
'content' => '一加一',
),
),
'model' => 'gpt-3.5-turbo',
)
data: {"id":"chatcmpl-7uhZPSBkdBmyAGAMnWS6IXKUs0ICS","object":"chat.completion.chunk","created":1693748207,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}]}
data: {"id":"chatcmpl-7uhZPSBkdBmyAGAMnWS6IXKUs0ICS","object":"chat.completion.chunk","created":1693748207,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"一"},"finish_reason":null}]}
data: {"id":"chatcmpl-7uhZPSBkdBmyAGAMnWS6IXKUs0ICS","object":"chat.completion.chunk","created":1693748207,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"加"},"finish_reason":null}]}
data: {"id":"chatcmpl-7uhZPSBkdBmyAGAMnWS6IXKUs0ICS","object":"chat.completion.chunk","created":1693748207,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"一"},"finish_reason":null}]}
data: {"id":"chatcmpl-7uhZPSBkdBmyAGAMnWS6IXKUs0ICS","object":"chat.completion.chunk","created":1693748207,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"等"},"finish_reason":null}]}
data: {"id":"chatcmpl-7uhZPSBkdBmyAGAMnWS6IXKUs0ICS","object":"chat.completion.chunk","created":1693748207,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"于"},"finish_reason":null}]}
data: {"id":"chatcmpl-7uhZPSBkdBmyAGAMnWS6IXKUs0ICS","object":"chat.completion.chunk","created":1693748207,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"二"},"finish_reason":null}]}
data: {"id":"chatcmpl-7uhZPSBkdBmyAGAMnWS6IXKUs0ICS","object":"chat.completion.chunk","created":1693748207,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"。"},"finish_reason":null}]}
data: {"id":"chatcmpl-7uhZPSBkdBmyAGAMnWS6IXKUs0ICS","object":"chat.completion.chunk","created":1693748207,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: [DONE]
想問一下是因為數(shù)據(jù)中沒有d*導(dǎo)致的嗎,還是其他原因呢?
還有一個地方不一樣:我自己的返回沒有Content-Length,我把$bodyLength改為1,下面的判斷注釋了,也只輸出到前端了一次,就沒有后續(xù)返回了,但是后端是記錄下來了的
HTTP/1.1 200 OK
Server: nginx
Date: Sun, 03 Sep 2023 13:40:38 GMT
Content-Type: text/event-stream
Connection: close
access-control-allow-origin: *
Cache-Control: no-cache, must-revalidate
openai-organization: user-vkiztc4bcsdmjem6e4kznbdk
openai-processing-ms: 8
openai-version: 2020-10-01
strict-transport-security: max-age=15724800; includeSubDomains
x-ratelimit-limit-requests: 200
x-ratelimit-limit-tokens: 40000
x-ratelimit-remaining-requests: 192
x-ratelimit-remaining-tokens: 37981
x-ratelimit-reset-requests: 53m28.919s
x-ratelimit-reset-tokens: 3.028s
x-request-id: 4a2df5e907041544ecc850cd3de1e75e
CF-Cache-Status: DYNAMIC
CF-RAY: 800e67dd6bb9cf65-SJC
alt-svc: h3=":443"; ma=86400
Strict-Transport-Security: max-age=31536000
大佬提供一下需求哈,有時間的話還望能實現(xiàn):
老大,剛才在客戶端給角色上傳圖片,很長時間沒動靜了,然后就刷新了頁面,結(jié)果所有角色都沒有了。咋辦呢
[Error] Failed to load resource: the server responded with a status of 404 () (roles, line 0)
[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.min.css.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 () (6de00f2697a1683b235e589897df757a94e6809643432a9e3ad259420752442d.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.bundle.min.js.map, line 0)