Skip to content

Commit 6b830a2

Browse files
committed
remove unused defaults, for more realistic coverage numbers
1 parent 410a87b commit 6b830a2

File tree

3 files changed

+41
-43
lines changed

3 files changed

+41
-43
lines changed

+llms/+internal/callAzureChatAPI.m

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
% - ApiKey
2222
% - TimeOut
2323
% - StreamFun
24-
% More details on the parameters: https://platform.openai.com/docs/api-reference/chat/create
24+
% More details on the parameters: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/chatgpt
2525
%
2626
% Example
2727
%
@@ -58,20 +58,20 @@
5858
deploymentID
5959
messages
6060
functions
61-
nvp.ToolChoice = []
62-
nvp.APIVersion = "2023-05-15"
63-
nvp.Temperature = 1
64-
nvp.TopProbabilityMass = 1
65-
nvp.NumCompletions = 1
66-
nvp.StopSequences = []
67-
nvp.MaxNumTokens = inf
68-
nvp.PresencePenalty = 0
69-
nvp.FrequencyPenalty = 0
70-
nvp.ResponseFormat = "text"
71-
nvp.Seed = []
72-
nvp.ApiKey = ""
73-
nvp.TimeOut = 10
74-
nvp.StreamFun = []
61+
nvp.ToolChoice
62+
nvp.APIVersion
63+
nvp.Temperature
64+
nvp.TopProbabilityMass
65+
nvp.NumCompletions
66+
nvp.StopSequences
67+
nvp.MaxNumTokens
68+
nvp.PresencePenalty
69+
nvp.FrequencyPenalty
70+
nvp.ResponseFormat
71+
nvp.Seed
72+
nvp.ApiKey
73+
nvp.TimeOut
74+
nvp.StreamFun
7575
end
7676

7777
URL = endpoint + "openai/deployments/" + deploymentID + "/chat/completions?api-version=" + nvp.APIVersion;

+llms/+internal/callOllamaChatAPI.m

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
% - ApiKey
2222
% - TimeOut
2323
% - StreamFun
24-
% More details on the parameters: https://platform.openai.com/docs/api-reference/chat/create
24+
% More details on the parameters: https://github.com/ollama/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values
2525
%
2626
% Example
2727
%
@@ -41,19 +41,17 @@
4141
arguments
4242
model
4343
messages
44-
nvp.Temperature = 1
45-
nvp.TopProbabilityMass = 1
46-
nvp.TopProbabilityNum = Inf
47-
nvp.TailFreeSamplingZ = 1
48-
nvp.NumCompletions = 1
49-
nvp.StopSequences = []
50-
nvp.MaxNumTokens = inf
51-
nvp.PresencePenalty = 0
52-
nvp.FrequencyPenalty = 0
53-
nvp.ResponseFormat = "text"
54-
nvp.Seed = []
55-
nvp.TimeOut = 10
56-
nvp.StreamFun = []
44+
nvp.Temperature
45+
nvp.TopProbabilityMass
46+
nvp.TopProbabilityNum
47+
nvp.TailFreeSamplingZ
48+
nvp.NumCompletions
49+
nvp.StopSequences
50+
nvp.MaxNumTokens
51+
nvp.ResponseFormat
52+
nvp.Seed
53+
nvp.TimeOut
54+
nvp.StreamFun
5755
end
5856

5957
URL = "http://localhost:11434/api/chat"; % TODO: model parameter

+llms/+internal/callOpenAIChatAPI.m

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,20 @@
5757
arguments
5858
messages
5959
functions
60-
nvp.ToolChoice = []
61-
nvp.ModelName = "gpt-3.5-turbo"
62-
nvp.Temperature = 1
63-
nvp.TopProbabilityMass = 1
64-
nvp.NumCompletions = 1
65-
nvp.StopSequences = []
66-
nvp.MaxNumTokens = inf
67-
nvp.PresencePenalty = 0
68-
nvp.FrequencyPenalty = 0
69-
nvp.ResponseFormat = "text"
70-
nvp.Seed = []
71-
nvp.ApiKey = ""
72-
nvp.TimeOut = 10
73-
nvp.StreamFun = []
60+
nvp.ToolChoice
61+
nvp.ModelName
62+
nvp.Temperature
63+
nvp.TopProbabilityMass
64+
nvp.NumCompletions
65+
nvp.StopSequences
66+
nvp.MaxNumTokens
67+
nvp.PresencePenalty
68+
nvp.FrequencyPenalty
69+
nvp.ResponseFormat
70+
nvp.Seed
71+
nvp.ApiKey
72+
nvp.TimeOut
73+
nvp.StreamFun
7474
end
7575

7676
END_POINT = "https://api.openai.com/v1/chat/completions";

0 commit comments

Comments
 (0)