]> git.giacomolli.uk - onechat/blobdiff - model.go
Escape tags in rich replies as HTML entities
[onechat] / model.go
index 3f3eccd8fb908ae1e796ea855bd6e77dfba17588..04b15563304af5720269f7a72272a41382952c95 100644 (file)
--- 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
 }