Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add standalone mode to SDKServer and server options #835

Closed
wants to merge 1 commit into from

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.
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