Skip to content

Conversation

rinor
Copy link
Contributor

@rinor rinor commented Sep 2, 2024

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

@rinor rinor force-pushed the sdkserver/standalone branch 2 times, most recently from b309295 to 937997f Compare September 7, 2024 06:28
@rinor rinor force-pushed the sdkserver/standalone branch 2 times, most recently from f9d95e5 to d4aced9 Compare September 18, 2024 16:33
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.
@rinor rinor force-pushed the sdkserver/standalone branch from d4aced9 to 258e4db Compare September 20, 2024 07:23
@rinor rinor closed this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants