huskies: merge 927
This commit is contained in:
@@ -31,6 +31,7 @@ use super::super::types::StoryAgent;
|
||||
const GATE_OUTPUT_PROMPT_BYTES: usize = 3_000;
|
||||
|
||||
/// Truncate `output` to at most [`GATE_OUTPUT_PROMPT_BYTES`], keeping the tail.
|
||||
#[allow(clippy::string_slice)] // adjusted is walked forward to a char boundary before slicing
|
||||
fn truncate_for_system_prompt(output: &str) -> &str {
|
||||
if output.len() <= GATE_OUTPUT_PROMPT_BYTES {
|
||||
return output;
|
||||
|
||||
Reference in New Issue
Block a user