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):
186
186
async def async_main (args ):
187
187
global global_interpreter
188
188
189
- if args ["serve" ]:
190
- global_interpreter = await async_load_interpreter (args )
191
- print ("Starting server..." )
192
- global_interpreter .server ()
193
- return
194
-
195
189
if (
196
190
args ["input" ] is None
197
191
and sys .stdin .isatty ()
Original file line number Diff line number Diff line change @@ -1073,6 +1073,21 @@ def server(self):
1073
1073
# Create and start server
1074
1074
server = Server (self )
1075
1075
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
+
1076
1091
server .run ()
1077
1092
except KeyboardInterrupt :
1078
1093
print ("\n Shutting down server..." )
You can’t perform that action at this time.
0 commit comments