We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
多次反复提交相同的prompt返回的prompt_cache_hit_tokens一直为0 `const completion = await openai.chat.completions.create({ messages: [ { role: "system", content: "提供一个方案,解决mongoose并发更新的赛马问题", }, ], model: "deepseek-chat", });
await delay(5000);
const completion2 = await openai.chat.completions.create({ messages: [ { role: "system", content: "提供一个方案,解决mongoose并发更新的赛马问题", }, { role: "assistant", content: completion.choices[0].message.content, }, { role: "system", content: "我的场景是在一个高并发的场景下,如何保证更新的原子性?", }, ], model: "deepseek-chat", });
console.log(JSON.stringify(completion2.usage)); console.log(completion2.choices[0].message.content);
{"prompt_tokens":1015,"completion_tokens":1457,"total_tokens":2472,"prompt_cache_hit_tokens":0,"prompt_cache_miss_tokens":1015} `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
多次反复提交相同的prompt返回的prompt_cache_hit_tokens一直为0
`const completion = await openai.chat.completions.create({
messages: [
{
role: "system",
content: "提供一个方案,解决mongoose并发更新的赛马问题",
},
],
model: "deepseek-chat",
});
await delay(5000);
const completion2 = await openai.chat.completions.create({
messages: [
{
role: "system",
content: "提供一个方案,解决mongoose并发更新的赛马问题",
},
{
role: "assistant",
content: completion.choices[0].message.content,
},
{
role: "system",
content: "我的场景是在一个高并发的场景下,如何保证更新的原子性?",
},
],
model: "deepseek-chat",
});
console.log(JSON.stringify(completion2.usage));
console.log(completion2.choices[0].message.content);
{"prompt_tokens":1015,"completion_tokens":1457,"total_tokens":2472,"prompt_cache_hit_tokens":0,"prompt_cache_miss_tokens":1015}
`
The text was updated successfully, but these errors were encountered: