mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Move JSON byte counting into codex-utils-string (#61465)
Export `serialized_json_bytes` from `codex-utils-string` and update core callers to use the shared helper. Preserve byte counting without retaining the serialized output. GitOrigin-RevId: 9c75b05592d3171b9a0d54517f8f3a4281fde987
This commit is contained in:
committed by
copyberry
parent
ecf54824c6
commit
336b19ab26
@@ -33,7 +33,6 @@ use crate::guardian::GUARDIAN_MAX_ROOT_MESSAGE_TOKENS;
|
||||
use crate::guardian::guardian_truncate_text;
|
||||
use crate::session::FileAudioDurations;
|
||||
use crate::session::turn_context::TurnContext;
|
||||
use crate::utils::json::serialized_json_bytes;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD as BASE64_STANDARD;
|
||||
use codex_attachment_store::AttachmentStore;
|
||||
@@ -79,6 +78,7 @@ use codex_utils_output_truncation::approx_token_count;
|
||||
use codex_utils_output_truncation::approx_tokens_from_byte_count_i64;
|
||||
use codex_utils_output_truncation::truncate_function_output_payload;
|
||||
use codex_utils_output_truncation::with_serialization_allowance;
|
||||
use codex_utils_string::serialized_json_bytes;
|
||||
use image::ImageReader;
|
||||
use std::collections::BTreeSet;
|
||||
use std::io::Cursor;
|
||||
|
||||
Reference in New Issue
Block a user