t.Run("messages with interleaved system",func(t*testing.T){
w:=createRequest(t,s.ChatHandler,api.ChatRequest{
Model:"test-system",
Messages:[]api.Message{
{Role:"user",Content:"Hello!"},
{Role:"assistant",Content:"I can help you with that."},
{Role:"system",Content:"You can perform magic tricks."},
{Role:"user",Content:"Help me write tests."},
},
Stream:&stream,
})
ifw.Code!=http.StatusOK{
t.Errorf("expected status 200, got %d",w.Code)
}
ifdiff:=cmp.Diff(mock.CompletionRequest.Prompt,"System: You are a helpful assistant. User: Hello! Assistant: I can help you with that. System: You can perform magic tricks. User: Help me write tests. ");diff!=""{