refactor: update cached content test body to meet token requirements and change model to lite
parent
5e1226a2b5
commit
ee5b9739a4
|
@ -64,10 +64,12 @@ pub static GENERATE_CONTENT_TEST_BODY: LazyLock<Value> = LazyLock::new(|| {
|
||||||
|
|
||||||
// LazyLock for the cached content test body used in cache API validation
|
// LazyLock for the cached content test body used in cache API validation
|
||||||
pub static CACHE_CONTENT_TEST_BODY: LazyLock<GeminiRequest> = LazyLock::new(|| {
|
pub static CACHE_CONTENT_TEST_BODY: LazyLock<GeminiRequest> = LazyLock::new(|| {
|
||||||
// Generate random text content to meet the minimum 1024 tokens requirement for cache API
|
// Generate random text content to meet the minimum 2048 tokens requirement for cache API
|
||||||
let long_text = "You are an expert at analyzing transcripts.".repeat(150);
|
// models/gemini-2.5-flash need 1024 tokens
|
||||||
|
// models/gemini-2.5-flash-lite need 2048 tokens
|
||||||
|
let long_text = "You are an expert at analyzing transcripts.".repeat(260);
|
||||||
GeminiRequest {
|
GeminiRequest {
|
||||||
model: Some("models/gemini-2.5-flash".to_string()),
|
model: Some("models/gemini-2.5-flash-lite".to_string()),
|
||||||
contents: vec![ContentPart {
|
contents: vec![ContentPart {
|
||||||
parts: vec![TextPart { text: long_text }],
|
parts: vec![TextPart { text: long_text }],
|
||||||
role: Some("user".to_string()),
|
role: Some("user".to_string()),
|
||||||
|
|
Loading…
Reference in New Issue