Files
langchain/libs/partners
ccurme 8a69de5c24 openai[patch]: ignore file blocks when counting tokens (#30601)
OpenAI does not appear to document how it transforms PDF pages to
images, which determines how tokens are counted:
https://platform.openai.com/docs/guides/pdf-files?api-mode=chat#usage-considerations

Currently these block types raise ValueError inside
`get_num_tokens_from_messages`. Here we update to generate a warning and
continue.
2025-04-01 15:29:33 -04:00
..
2025-02-13 21:32:34 +00:00
2025-03-31 13:29:45 +00:00
2024-07-12 21:14:24 +00:00
2025-02-13 21:32:34 +00:00
2025-03-20 20:25:16 +00:00