mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🚀 feat: o1 (#4019)
* feat: o1 default response sender string * feat: add o1 models to default openai models list, add `no_system_messages` error type; refactor: use error type as localization key * refactor(MessageEndpointIcon): differentiate openAI icon model color for o1 models * refactor(AnthropicClient): use new input/output tokens keys; add prompt caching for claude-3-opus * refactor(BaseClient): to use new input/output tokens keys; update typedefs * feat: initial o1 model handling, including token cost complexity * EXPERIMENTAL: special handling for o1 model with custom instructions
This commit is contained in:
parent
9a393be012
commit
45b42830a5
12 changed files with 229 additions and 36 deletions
|
@ -1443,7 +1443,19 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @typedef {AnthropicStreamUsage} StreamUsage - Stream usage for all providers (currently only Anthropic)
|
||||
* @exports OpenAIUsageMetadata
|
||||
* @typedef {Object} OpenAIUsageMetadata - Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).
|
||||
* @property {number} [usage.completion_tokens] - Number of completion tokens used over the course of the run.
|
||||
* @property {number} [usage.prompt_tokens] - Number of prompt tokens used over the course of the run.
|
||||
* @property {number} [usage.total_tokens] - Total number of tokens used (prompt + completion).
|
||||
* @property {number} [usage.reasoning_tokens] - Total number of tokens used for reasoning (OpenAI o1 models).
|
||||
* @property {Object} [usage.completion_tokens_details] - Further details on the completion tokens used (OpenAI o1 models).
|
||||
* @property {number} [usage.completion_tokens_details.reasoning_tokens] - Total number of tokens used for reasoning (OpenAI o1 models).
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {AnthropicStreamUsage | OpenAIUsageMetadata | UsageMetadata} StreamUsage - Stream usage for all providers (currently only Anthropic, OpenAI, LangChain)
|
||||
*/
|
||||
|
||||
/* Native app/client methods */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue