MCPcopy
hub / github.com/docker/docker-agent / TestRuntime_Mistral_Basic

Function TestRuntime_Mistral_Basic

e2e/runtime_test.go:103–124  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

101}
102
103func TestRuntime_Mistral_Basic(t *testing.T) {
104 t.Parallel()
105
106 ctx := t.Context()
107 agentSource, err := config.Resolve("testdata/basic.yaml", nil)
108 require.NoError(t, err)
109
110 _, runConfig := startRecordingAIProxy(t)
111 team, err := teamloader.Load(ctx, agentSource, runConfig, append(loaderdefaults.Opts(), teamloader.WithModelOverrides([]string{"mistral/mistral-small"}))...)
112 require.NoError(t, err)
113
114 rt, err := runtime.New(t.Context(), team)
115 require.NoError(t, err)
116
117 sess := session.New(session.WithUserMessage("What's 2+2?"))
118 _, err = rt.Run(ctx, sess)
119 require.NoError(t, err)
120
121 response := sess.GetLastAssistantMessageContent()
122 assert.Equal(t, "The sum of 2 + 2 is 4.", response)
123 // Title generation is now handled by pkg/app or pkg/server, not the runtime
124}

Callers

nothing calls this directly

Calls 10

ResolveFunction · 0.92
LoadFunction · 0.92
WithModelOverridesFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92
WithUserMessageFunction · 0.92
startRecordingAIProxyFunction · 0.85
ContextMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected