mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Fix mock server (#1392)
This commit is contained in:
parent
e9a9186717
commit
c0adb55bfa
@ -33,7 +33,7 @@ def read_root():
|
||||
return {'message': 'This is a mock server'}
|
||||
|
||||
|
||||
@app.get('/litellm-models')
|
||||
@app.get('/api/litellm-models')
|
||||
def read_llm_models():
|
||||
return [
|
||||
'gpt-4',
|
||||
@ -43,7 +43,7 @@ def read_llm_models():
|
||||
]
|
||||
|
||||
|
||||
@app.get('/agents')
|
||||
@app.get('/api/agents')
|
||||
def read_llm_agents():
|
||||
return [
|
||||
'MonologueAgent',
|
||||
@ -52,5 +52,25 @@ def read_llm_agents():
|
||||
]
|
||||
|
||||
|
||||
@app.get('/api/messages')
|
||||
async def get_messages():
|
||||
return {'messages': []}
|
||||
|
||||
|
||||
@app.get('/api/messages/total')
|
||||
async def get_message_total():
|
||||
return {'msg_total': 0}
|
||||
|
||||
|
||||
@app.get('/api/refresh-files')
|
||||
def refresh_files():
|
||||
return {
|
||||
'name': 'workspace',
|
||||
'children': [
|
||||
{'name': 'hello_world.py', 'children': []},
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
uvicorn.run(app, host='127.0.0.1', port=3000)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user