Closed AndyLin2020 closed 6 months ago
curl http://127.0.0.1:3050/v1/chat/completions -H "Content-Type: application/json" -d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "user", "content": "Hello!" } ], "stream": true }' data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" How"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" can"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" I"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" assist"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" today"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":"?"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9HOzx2PhnYCLPxQ3Dpa2OKoqR2lgl","object":"chat.completion","created":1713934697,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}]}
data: [DONE]
日志: [GIN] 2024/04/26 - 01:17:04 | 200 | 646.715302ms | 192.168.100.1 | POST "/v1/chat/completions" [GIN] 2024/04/26 - 01:17:23 | 204 | 28.179µs | 192.168.100.1 | OPTIONS "/v1/chat/completions" [GIN] 2024/04/26 - 01:17:23 | 200 | 394.157532ms | 192.168.100.1 | POST "/v1/chat/completions" [GIN] 2024/04/26 - 01:17:31 | 204 | 19.68µs | 192.168.100.1 | OPTIONS "/dashboard/billing/usage?start_date=2024-04-01&end_date=2024-04-27" [GIN] 2024/04/26 - 01:17:31 | 204 | 4.899µs | 192.168.100.1 | OPTIONS "/dashboard/billing/subscription" [GIN] 2024/04/26 - 01:17:31 | 404 | 4.537µs | 192.168.100.1 | GET "/dashboard/billing/usage?start_date=2024-04-01&end_date=2024-04-27" [GIN] 2024/04/26 - 01:17:31 | 404 | 3.116µs | 192.168.100.1 | GET "/dashboard/billing/subscription" [GIN] 2024/04/26 - 01:17:59 | 200 | 636.093793ms | 192.168.100.1 | POST "/v1/chat/completions" [GIN] 2024/04/26 - 01:19:35 | 200 | 1.593112139s | 172.18.0.1 | POST "/v1/chat/completions" [GIN] 2024/04/26 - 01:21:14 | 200 | 607.042609ms | 192.168.100.1 | POST "/v1/chat/completions?path=v1&path=chat&path=completions" [GIN] 2024/04/26 - 01:24:33 | 404 | 3.463µs | 192.168.100.1 | GET "/dashboard/billing/subscription" [GIN] 2024/04/26 - 01:24:33 | 404 | 3.97µs | 192.168.100.1 | GET "/dashboard/billing/usage?start_date=2024-04-01&end_date=2024-04-27" [GIN] 2024/04/26 - 01:24:42 | 200 | 624.160159ms | 192.168.100.1 | POST "/v1/chat/completions"
是不是时区的问题呢? Docker里的时区是+0
Fixed https://github.com/missuo/FreeDuckDuckGo/commit/c1630a1d13bc995a6e82ccbbc9631e9d83b293d4
curl http://127.0.0.1:3050/v1/chat/completions -H "Content-Type: application/json" -d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "user", "content": "Hello!" } ], "stream": true }' data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" How"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" can"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" I"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" assist"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":" today"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":"?"},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9I4gWtdzyi0CVXMYeCs66ILOj1Wef","object":"chat.completion","created":1714094940,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":null}]}
data: {"id":"chatcmpl-9HOzx2PhnYCLPxQ3Dpa2OKoqR2lgl","object":"chat.completion","created":1713934697,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"delta":{"content":""},"logprobs":null,"finish_reason":"stop"}]}
data: [DONE]
日志: [GIN] 2024/04/26 - 01:17:04 | 200 | 646.715302ms | 192.168.100.1 | POST "/v1/chat/completions" [GIN] 2024/04/26 - 01:17:23 | 204 | 28.179µs | 192.168.100.1 | OPTIONS "/v1/chat/completions" [GIN] 2024/04/26 - 01:17:23 | 200 | 394.157532ms | 192.168.100.1 | POST "/v1/chat/completions" [GIN] 2024/04/26 - 01:17:31 | 204 | 19.68µs | 192.168.100.1 | OPTIONS "/dashboard/billing/usage?start_date=2024-04-01&end_date=2024-04-27" [GIN] 2024/04/26 - 01:17:31 | 204 | 4.899µs | 192.168.100.1 | OPTIONS "/dashboard/billing/subscription" [GIN] 2024/04/26 - 01:17:31 | 404 | 4.537µs | 192.168.100.1 | GET "/dashboard/billing/usage?start_date=2024-04-01&end_date=2024-04-27" [GIN] 2024/04/26 - 01:17:31 | 404 | 3.116µs | 192.168.100.1 | GET "/dashboard/billing/subscription" [GIN] 2024/04/26 - 01:17:59 | 200 | 636.093793ms | 192.168.100.1 | POST "/v1/chat/completions" [GIN] 2024/04/26 - 01:19:35 | 200 | 1.593112139s | 172.18.0.1 | POST "/v1/chat/completions" [GIN] 2024/04/26 - 01:21:14 | 200 | 607.042609ms | 192.168.100.1 | POST "/v1/chat/completions?path=v1&path=chat&path=completions" [GIN] 2024/04/26 - 01:24:33 | 404 | 3.463µs | 192.168.100.1 | GET "/dashboard/billing/subscription" [GIN] 2024/04/26 - 01:24:33 | 404 | 3.97µs | 192.168.100.1 | GET "/dashboard/billing/usage?start_date=2024-04-01&end_date=2024-04-27" [GIN] 2024/04/26 - 01:24:42 | 200 | 624.160159ms | 192.168.100.1 | POST "/v1/chat/completions"