X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/6d1d9d9a7cf90b25a2e10af1c5bc56faee7e494c..fbee1a3e74297e1f73b3fc99913861b80c96cf87:/model.go?ds=sidebyside diff --git a/model.go b/model.go index 3f3eccd..04b1556 100644 --- a/model.go +++ b/model.go @@ -45,7 +45,7 @@ var errModelCallLimit = errors.New("call limit reached") // OPENAI_API_KEY, and there is no fallback from one to the other. All clients // share the authorizer, so one refresh runs at a time. func modelEndpoint(config Config, dir string) (string, ModelAuthorizer, error) { - if config.Endpoint == endpointAPI { + if config.Endpoint == configEndpointAPI { key := os.Getenv("OPENAI_API_KEY") if key == "" { return "", nil, errors.New("endpoint api needs OPENAI_API_KEY") @@ -310,7 +310,7 @@ type ModelRequest struct { Instructions string Tools []ModelTool Input []any - Node *nodeKey + Node *NodeKey Turn string }