MCPcopy Create free account
hub / github.com/danielmiessler/Fabric / TestBuildChatOptions

Function TestBuildChatOptions

internal/cli/flags_test.go:51–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

49}
50
51func TestBuildChatOptions(t *testing.T) {
52 flags := &Flags{
53 Temperature: 0.8,
54 TopP: 0.9,
55 PresencePenalty: 0.1,
56 FrequencyPenalty: 0.2,
57 Seed: 1,
58 }
59
60 expectedOptions := &domain.ChatOptions{
61 Temperature: 0.8,
62 TopP: 0.9,
63 PresencePenalty: 0.1,
64 FrequencyPenalty: 0.2,
65 Raw: false,
66 Seed: 1,
67 Thinking: domain.ThinkingLevel(""),
68 SuppressThink: false,
69 ThinkStartTag: "<think>",
70 ThinkEndTag: "</think>",
71 }
72 options, err := flags.BuildChatOptions()
73 assert.NoError(t, err)
74 assert.Equal(t, expectedOptions, options)
75}
76
77func TestBuildChatOptionsDefaultSeed(t *testing.T) {
78 flags := &Flags{

Callers

nothing calls this directly

Calls 2

BuildChatOptionsMethod · 0.95
ThinkingLevelTypeAlias · 0.92

Tested by

no test coverage detected