mirror of
https://github.com/ollama/ollama.git
synced 2026-11-10 15:02:13 -06:00
18 lines
582 B
Go
18 lines
582 B
Go
package openai
|
|
|
|
// ResponsesSignInMessage is safe to display without device sign-in details.
|
|
const ResponsesSignInMessage = "This model requires an Ollama account. Please sign in to Ollama to use this model."
|
|
|
|
type ResponsesErrorResponse struct {
|
|
Error Error `json:"error"`
|
|
SigninURL string `json:"signin_url,omitempty"`
|
|
}
|
|
|
|
func NewResponsesAuthenticationError(signinURL string) ResponsesErrorResponse {
|
|
code := "authentication_error"
|
|
return ResponsesErrorResponse{
|
|
Error: Error{Message: ResponsesSignInMessage, Type: code, Code: &code},
|
|
SigninURL: signinURL,
|
|
}
|
|
}
|