You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: completion.go
-33
Original file line number
Diff line number
Diff line change
@@ -2,33 +2,9 @@ package openai
2
2
3
3
import (
4
4
"context"
5
-
"errors"
6
5
"net/http"
7
6
)
8
7
9
-
var (
10
-
// Deprecated: use ErrReasoningModelMaxTokensDeprecated instead.
11
-
ErrO1MaxTokensDeprecated=errors.New("this model is not supported MaxTokens, please use MaxCompletionTokens") //nolint:lll
12
-
ErrCompletionUnsupportedModel=errors.New("this model is not supported with this method, please use CreateChatCompletion client method instead") //nolint:lll
13
-
ErrCompletionStreamNotSupported=errors.New("streaming is not supported with this method, please use CreateCompletionStream") //nolint:lll
14
-
ErrCompletionRequestPromptTypeNotSupported=errors.New("the type of CompletionRequest.Prompt only supports string and []string") //nolint:lll
15
-
)
16
-
17
-
var (
18
-
ErrO1BetaLimitationsMessageTypes=errors.New("this model has beta-limitations, user and assistant messages only, system messages are not supported") //nolint:lll
19
-
ErrO1BetaLimitationsTools=errors.New("this model has beta-limitations, tools, function calling, and response format parameters are not supported") //nolint:lll
20
-
// Deprecated: use ErrReasoningModelLimitations* instead.
21
-
ErrO1BetaLimitationsLogprobs=errors.New("this model has beta-limitations, logprobs not supported") //nolint:lll
22
-
ErrO1BetaLimitationsOther=errors.New("this model has beta-limitations, temperature, top_p and n are fixed at 1, while presence_penalty and frequency_penalty are fixed at 0") //nolint:lll
23
-
)
24
-
25
-
var (
26
-
//nolint:lll
27
-
ErrReasoningModelMaxTokensDeprecated=errors.New("this model is not supported MaxTokens, please use MaxCompletionTokens")
28
-
ErrReasoningModelLimitationsLogprobs=errors.New("this model has beta-limitations, logprobs not supported") //nolint:lll
29
-
ErrReasoningModelLimitationsOther=errors.New("this model has beta-limitations, temperature, top_p and n are fixed at 1, while presence_penalty and frequency_penalty are fixed at 0") //nolint:lll
30
-
)
31
-
32
8
// GPT3 Defines the models provided by OpenAI to use when generating
33
9
// completions from OpenAI.
34
10
// GPT3 Models are designed for text-based tasks. For code-specific
Copy file name to clipboardExpand all lines: reasoning_validator.go
+36-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,41 @@
1
1
package openai
2
2
3
-
import"strings"
3
+
import (
4
+
"errors"
5
+
"strings"
6
+
)
7
+
8
+
var (
9
+
// Deprecated: use ErrReasoningModelMaxTokensDeprecated instead.
10
+
ErrO1MaxTokensDeprecated=errors.New("this model is not supported MaxTokens, please use MaxCompletionTokens") //nolint:lll
11
+
ErrCompletionUnsupportedModel=errors.New("this model is not supported with this method, please use CreateChatCompletion client method instead") //nolint:lll
12
+
ErrCompletionStreamNotSupported=errors.New("streaming is not supported with this method, please use CreateCompletionStream") //nolint:lll
13
+
ErrCompletionRequestPromptTypeNotSupported=errors.New("the type of CompletionRequest.Prompt only supports string and []string") //nolint:lll
14
+
)
15
+
16
+
var (
17
+
ErrO1BetaLimitationsMessageTypes=errors.New("this model has beta-limitations, user and assistant messages only, system messages are not supported") //nolint:lll
18
+
ErrO1BetaLimitationsTools=errors.New("this model has beta-limitations, tools, function calling, and response format parameters are not supported") //nolint:lll
19
+
// Deprecated: use ErrReasoningModelLimitations* instead.
20
+
ErrO1BetaLimitationsLogprobs=errors.New("this model has beta-limitations, logprobs not supported") //nolint:lll
21
+
ErrO1BetaLimitationsOther=errors.New("this model has beta-limitations, temperature, top_p and n are fixed at 1, while presence_penalty and frequency_penalty are fixed at 0") //nolint:lll
22
+
)
23
+
24
+
var (
25
+
//nolint:lll
26
+
ErrReasoningModelMaxTokensDeprecated=errors.New("this model is not supported MaxTokens, please use MaxCompletionTokens")
27
+
ErrReasoningModelLimitationsLogprobs=errors.New("this model has beta-limitations, logprobs not supported") //nolint:lll
28
+
ErrReasoningModelLimitationsOther=errors.New("this model has beta-limitations, temperature, top_p and n are fixed at 1, while presence_penalty and frequency_penalty are fixed at 0") //nolint:lll
0 commit comments