MCPcopy Index your code
hub / github.com/coder/coder / insertChatModelConfigWithCallConfig

Function insertChatModelConfigWithCallConfig

coderd/x/chatd/chatd_test.go:6200–6221  ·  view source on GitHub ↗
(
	t *testing.T,
	db database.Store,
	userID uuid.UUID,
	provider string,
	model string,
	callConfig codersdk.ChatModelCallConfig,
)

Source from the content-addressed store, hash-verified

6198}
6199
6200func insertChatModelConfigWithCallConfig(
6201 t *testing.T,
6202 db database.Store,
6203 userID uuid.UUID,
6204 provider string,
6205 model string,
6206 callConfig codersdk.ChatModelCallConfig,
6207) database.ChatModelConfig {
6208 t.Helper()
6209
6210 options, err := json.Marshal(callConfig)
6211 require.NoError(t, err)
6212
6213 return dbgen.ChatModelConfig(t, db, database.ChatModelConfig{
6214 Provider: provider,
6215 Model: model,
6216 DisplayName: model,
6217 CreatedBy: uuid.NullUUID{UUID: userID, Valid: true},
6218 UpdatedBy: uuid.NullUUID{UUID: userID, Valid: true},
6219 Options: options,
6220 })
6221}
6222
6223func insertUserTextMessage(
6224 t *testing.T,

Calls 3

ChatModelConfigFunction · 0.92
HelperMethod · 0.65
MarshalMethod · 0.45

Tested by

no test coverage detected