Skip to content

Commit 8d351a2

Browse files
committed
increase default timeout to 120 seconds for ollamaChat
1 parent dde7d95 commit 8d351a2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ollamaChat.m

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,30 @@
4242
% StreamFun - Function to callback when streaming the
4343
% result
4444
%
45-
% TimeOut - Connection Timeout in seconds (default: 10 secs)
45+
% TimeOut - Connection Timeout in seconds (default: 120 secs)
4646
%
4747
%
4848
%
4949
% ollamaChat Functions:
5050
% ollamaChat - Chat completion API from OpenAI.
5151
% generate - Generate a response using the ollamaChat instance.
5252
%
53-
% ollamaChat Properties: TODO TODO
53+
% ollamaChat Properties:
5454
% Model - Model name (as expected by ollama server)
5555
%
5656
% Temperature - Temperature of generation.
5757
%
58-
% TopProbabilityMass - Top probability mass to consider for generation.
58+
% TopProbabilityMass - Top probability mass to consider for generation (top-p sampling).
59+
%
60+
% TopProbabilityNum - Only consider the k most likely tokens for generation (top-k sampling).
5961
%
6062
% StopSequences - Sequences to stop the generation of tokens.
6163
%
6264
% SystemPrompt - System prompt.
6365
%
6466
% ResponseFormat - Specifies the response format, text or json
6567
%
66-
% TimeOut - Connection Timeout in seconds (default: 10 secs)
68+
% TimeOut - Connection Timeout in seconds (default: 120 secs)
6769
%
6870

6971
% Copyright 2024 The MathWorks, Inc.
@@ -83,7 +85,7 @@
8385
nvp.TopProbabilityNum (1,1) {mustBeReal,mustBePositive} = Inf
8486
nvp.StopSequences {llms.utils.mustBeValidStop} = {}
8587
nvp.ResponseFormat (1,1) string {mustBeMember(nvp.ResponseFormat,["text","json"])} = "text"
86-
nvp.TimeOut (1,1) {mustBeReal,mustBePositive} = 10
88+
nvp.TimeOut (1,1) {mustBeReal,mustBePositive} = 120
8789
nvp.StreamFun (1,1) {mustBeA(nvp.StreamFun,'function_handle')}
8890
end
8991

0 commit comments

Comments
 (0)