File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -186,12 +186,6 @@ async def async_load_interpreter(args):
186186async def async_main (args ):
187187 global global_interpreter
188188
189- if args ["serve" ]:
190- global_interpreter = await async_load_interpreter (args )
191- print ("Starting server..." )
192- global_interpreter .server ()
193- return
194-
195189 if (
196190 args ["input" ] is None
197191 and sys .stdin .isatty ()
Original file line number Diff line number Diff line change @@ -1073,6 +1073,21 @@ def server(self):
10731073 # Create and start server
10741074 server = Server (self )
10751075 try :
1076+ host = server .host
1077+ port = server .port
1078+
1079+ print ("\n " + "=" * 60 )
1080+ print (f"Open Interpreter API Server" )
1081+ print ("=" * 60 )
1082+ print ("\n To use with an OpenAI-compatible client, configure:" )
1083+ print (f" - API Base: http://{ host } :{ port } " )
1084+ print (f" - API Path: /chat/completions" )
1085+ print (f" - API Key: (any value, authentication not required)" )
1086+ print (f" - Model name: (any value, ignored)" )
1087+ print ("\n NOTE: The server will use the model configured in --model" )
1088+ print (f" Currently using: { self .model } " )
1089+ print ("=" * 60 + "\n " )
1090+
10761091 server .run ()
10771092 except KeyboardInterrupt :
10781093 print ("\n Shutting down server..." )
You can’t perform that action at this time.
0 commit comments