@@ -217,8 +217,8 @@ func TestPrefixPluginChatCompletions(t *testing.T) {
217
217
Body : & types.LLMRequestBody {
218
218
ChatCompletions : & types.ChatCompletionsRequest {
219
219
Messages : []types.Message {
220
- {Role : "user" , Content : "hello world" },
221
- {Role : "assistant" , Content : "hi there" },
220
+ {Role : "user" , Content : types. Content { Raw : "hello world" } },
221
+ {Role : "assistant" , Content : types. Content { Raw : "hi there" } },
222
222
},
223
223
},
224
224
},
@@ -252,8 +252,8 @@ func TestPrefixPluginChatCompletionsGrowth(t *testing.T) {
252
252
Body : & types.LLMRequestBody {
253
253
ChatCompletions : & types.ChatCompletionsRequest {
254
254
Messages : []types.Message {
255
- {Role : "system" , Content : "You are a helpful assistant" },
256
- {Role : "user" , Content : "Hello, how are you?" },
255
+ {Role : "system" , Content : types. Content { Raw : "You are a helpful assistant" } },
256
+ {Role : "user" , Content : types. Content { Raw : "Hello, how are you?" } },
257
257
},
258
258
},
259
259
},
@@ -285,10 +285,10 @@ func TestPrefixPluginChatCompletionsGrowth(t *testing.T) {
285
285
Body : & types.LLMRequestBody {
286
286
ChatCompletions : & types.ChatCompletionsRequest {
287
287
Messages : []types.Message {
288
- {Role : "system" , Content : "You are a helpful assistant" },
289
- {Role : "user" , Content : "Hello, how are you?" },
290
- {Role : "assistant" , Content : "I'm doing well, thank you! How can I help you today?" },
291
- {Role : "user" , Content : "Can you explain how prefix caching works?" },
288
+ {Role : "system" , Content : types. Content { Raw : "You are a helpful assistant" } },
289
+ {Role : "user" , Content : types. Content { Raw : "Hello, how are you?" } },
290
+ {Role : "assistant" , Content : types. Content { Raw : "I'm doing well, thank you! How can I help you today?" } },
291
+ {Role : "user" , Content : types. Content { Raw : "Can you explain how prefix caching works?" } },
292
292
},
293
293
},
294
294
},
@@ -318,12 +318,12 @@ func TestPrefixPluginChatCompletionsGrowth(t *testing.T) {
318
318
Body : & types.LLMRequestBody {
319
319
ChatCompletions : & types.ChatCompletionsRequest {
320
320
Messages : []types.Message {
321
- {Role : "system" , Content : "You are a helpful assistant" },
322
- {Role : "user" , Content : "Hello, how are you?" },
323
- {Role : "assistant" , Content : "I'm doing well, thank you! How can I help you today?" },
324
- {Role : "user" , Content : "Can you explain how prefix caching works?" },
325
- {Role : "assistant" , Content : "Prefix caching is a technique where..." },
326
- {Role : "user" , Content : "That's very helpful, thank you!" },
321
+ {Role : "system" , Content : types. Content { Raw : "You are a helpful assistant" } },
322
+ {Role : "user" , Content : types. Content { Raw : "Hello, how are you?" } },
323
+ {Role : "assistant" , Content : types. Content { Raw : "I'm doing well, thank you! How can I help you today?" } },
324
+ {Role : "user" , Content : types. Content { Raw : "Can you explain how prefix caching works?" } },
325
+ {Role : "assistant" , Content : types. Content { Raw : "Prefix caching is a technique where..." } },
326
+ {Role : "user" , Content : types. Content { Raw : "That's very helpful, thank you!" } },
327
327
},
328
328
},
329
329
},
@@ -443,15 +443,15 @@ func BenchmarkPrefixPluginChatCompletionsStress(b *testing.B) {
443
443
b .Run (fmt .Sprintf ("messages_%d_length_%d" , scenario .messageCount , scenario .messageLength ), func (b * testing.B ) {
444
444
// Generate messages for this scenario
445
445
messages := make ([]types.Message , scenario .messageCount )
446
- messages [0 ] = types.Message {Role : "system" , Content : "You are a helpful assistant." }
446
+ messages [0 ] = types.Message {Role : "system" , Content : types. Content { Raw : "You are a helpful assistant." } }
447
447
448
448
for i := 1 ; i < scenario .messageCount ; i ++ {
449
449
role := "user"
450
450
if i % 2 == 0 {
451
451
role = "assistant"
452
452
}
453
453
content := randomPrompt (scenario .messageLength )
454
- messages [i ] = types.Message {Role : role , Content : content }
454
+ messages [i ] = types.Message {Role : role , Content : types. Content { Raw : content } }
455
455
}
456
456
457
457
pod := & types.PodMetrics {
0 commit comments