helpers.py aktualisiert
This commit is contained in:
@@ -172,7 +172,7 @@ def token_count(text, model=None):
|
||||
logger = logging.getLogger(__name__)
|
||||
if not text or not isinstance(text, str): return 0
|
||||
|
||||
current_model = model if model else getattr(Config, 'TOKEN_MODEL', 'gpt-3.5-turbo')
|
||||
current_model = model if model else getattr(Config, 'TOKEN_MODEL', 'gpt-4o-mini')
|
||||
if tiktoken:
|
||||
try:
|
||||
if not hasattr(token_count, 'enc_cache'): token_count.enc_cache = {}
|
||||
|
||||
Reference in New Issue
Block a user