Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -101,7 +101,7 @@ def receipt_radar_prompt(raw_text:str)->str:
|
|
| 101 |
|
| 102 |
def adjust_prompt_tokens_v1(prompt: str) -> str:
|
| 103 |
max_tokens = 127500
|
| 104 |
-
encoding = tiktoken.encoding_for_model(
|
| 105 |
tokenized_prompt = encoding.encode(prompt)
|
| 106 |
|
| 107 |
# If token count exceeds max_tokens, trim it from the end while keeping full words
|
|
|
|
| 101 |
|
| 102 |
def adjust_prompt_tokens_v1(prompt: str) -> str:
|
| 103 |
max_tokens = 127500
|
| 104 |
+
encoding = tiktoken.encoding_for_model('gpt-4o-mini')
|
| 105 |
tokenized_prompt = encoding.encode(prompt)
|
| 106 |
|
| 107 |
# If token count exceeds max_tokens, trim it from the end while keeping full words
|