@@ -217,8 +217,8 @@ func TestPrefixPluginChatCompletions(t *testing.T) {
217217 Body : & types.LLMRequestBody {
218218 ChatCompletions : & types.ChatCompletionsRequest {
219219 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" } },
222222 },
223223 },
224224 },
@@ -252,8 +252,8 @@ func TestPrefixPluginChatCompletionsGrowth(t *testing.T) {
252252 Body : & types.LLMRequestBody {
253253 ChatCompletions : & types.ChatCompletionsRequest {
254254 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?" } },
257257 },
258258 },
259259 },
@@ -285,10 +285,10 @@ func TestPrefixPluginChatCompletionsGrowth(t *testing.T) {
285285 Body : & types.LLMRequestBody {
286286 ChatCompletions : & types.ChatCompletionsRequest {
287287 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?" } },
292292 },
293293 },
294294 },
@@ -318,12 +318,12 @@ func TestPrefixPluginChatCompletionsGrowth(t *testing.T) {
318318 Body : & types.LLMRequestBody {
319319 ChatCompletions : & types.ChatCompletionsRequest {
320320 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!" } },
327327 },
328328 },
329329 },
@@ -443,15 +443,15 @@ func BenchmarkPrefixPluginChatCompletionsStress(b *testing.B) {
443443 b .Run (fmt .Sprintf ("messages_%d_length_%d" , scenario .messageCount , scenario .messageLength ), func (b * testing.B ) {
444444 // Generate messages for this scenario
445445 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." } }
447447
448448 for i := 1 ; i < scenario .messageCount ; i ++ {
449449 role := "user"
450450 if i % 2 == 0 {
451451 role = "assistant"
452452 }
453453 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 } }
455455 }
456456
457457 pod := & types.PodMetrics {
0 commit comments