File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,14 @@ type Client struct {
1818}
1919
2020type Options struct {
21- Cache * bool `usage:"Disable caching" default:"true "`
22- CacheDir string `usage:"Directory to store cache (default: $XDG_CACHE_HOME/gptscript)"`
21+ DisableCache bool `usage:"Disable caching of LLM API responses "`
22+ CacheDir string `usage:"Directory to store cache (default: $XDG_CACHE_HOME/gptscript)"`
2323}
2424
2525func Complete (opts ... Options ) (result Options ) {
2626 for _ , opt := range opts {
2727 result .CacheDir = types .FirstSet (opt .CacheDir , result .CacheDir )
28- result .Cache = types .FirstSet (opt .Cache , result .Cache )
29- }
30- if result .Cache == nil {
31- result .Cache = & []bool {true }[0 ]
28+ result .DisableCache = types .FirstSet (opt .DisableCache , result .DisableCache )
3229 }
3330 if result .CacheDir == "" {
3431 result .CacheDir = filepath .Join (xdg .CacheHome , version .ProgramName )
@@ -54,7 +51,7 @@ func New(opts ...Options) (*Client, error) {
5451 }
5552 return & Client {
5653 dir : opt .CacheDir ,
57- noop : ! * opt .Cache ,
54+ noop : opt .DisableCache ,
5855 }, nil
5956}
6057
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ func complete(opts ...Options) (result Options, err error) {
6868
6969 if result .Cache == nil {
7070 result .Cache , err = cache .New (cache.Options {
71- Cache : new ( bool ) ,
71+ DisableCache : true ,
7272 })
7373 }
7474
You can’t perform that action at this time.
0 commit comments