mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-30 21:45:01 +02:00
Add translate message action (#6609)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -42,6 +42,6 @@
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"openai": "^4.56.0",
|
||||
"tiktoken": "^1.0.16"
|
||||
"js-tiktoken": "^1.0.14"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
//
|
||||
|
||||
import OpenAI from 'openai'
|
||||
import { Tiktoken } from 'tiktoken'
|
||||
import { Tiktoken } from 'js-tiktoken'
|
||||
|
||||
// Based on https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb
|
||||
export function countTokens (messages: OpenAI.ChatCompletionMessageParam[], encoding: Tiktoken): number {
|
||||
|
||||
Reference in New Issue
Block a user