gptscript
gptscript copied to clipboard
feat: add standalone mode to SDKServer and server options
Added a new Standalone
boolean field to the SDKServer
and Options
structs to support running the server in standalone mode. Updated the server run logic to conditionally skip the stdin read hack when in standalone mode.
Why: because I need to run a single instance of the server on my own, but the hack prevents the server to start in environments where stdin is 'closed' (reading returns EOF immediately), ie:
$ gptscript sys.sdkserver --listen-address=0.0.0.0:9090 < /dev/null
[::]:9090
08:23:24 Shutting down server
08:23:24 Server stopped