mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-10 11:47:42 +02:00
Add translate message action (#6609)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -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