fix format

This commit is contained in:
better629 2023-12-21 15:06:59 +08:00
parent 18a195a367
commit 6af9fecf65
7 changed files with 26 additions and 46 deletions

View file

@ -226,7 +226,7 @@ class OutputParser:
if start_index != -1 and end_index != -1:
# Extract the structure part
structure_text = text[start_index: end_index + 1]
structure_text = text[start_index : end_index + 1]
try:
# Attempt to convert the text to a Python data type using ast.literal_eval

View file

@ -26,7 +26,7 @@ TOKEN_COSTS = {
"gpt-4-1106-preview": {"prompt": 0.01, "completion": 0.03},
"text-embedding-ada-002": {"prompt": 0.0004, "completion": 0.0},
"chatglm_turbo": {"prompt": 0.0, "completion": 0.00069}, # 32k version, prompt + completion tokens=0.005¥/k-tokens
"gemini-pro": {"prompt": 0.00025, "completion": 0.0005}
"gemini-pro": {"prompt": 0.00025, "completion": 0.0005},
}
@ -45,7 +45,7 @@ TOKEN_MAX = {
"gpt-4-1106-preview": 128000,
"text-embedding-ada-002": 8192,
"chatglm_turbo": 32768,
"gemini-pro": 32768
"gemini-pro": 32768,
}