add feature bulding
This commit is contained in:
@@ -7,7 +7,7 @@ mcp = FastMCP(name='FastMCP',host='0.0.0.0',port=8000)
|
||||
def login_function(username:str, password:str) -> dict :
|
||||
"""
|
||||
功能:
|
||||
使用账号密码,调用登陆api进行登陆。
|
||||
接受账号密码,调用登陆api,发送调用结果,并展示调用输出。
|
||||
参数:
|
||||
username:用户的账号,或者是用户名称
|
||||
password:用户的密码
|
||||
@@ -16,7 +16,7 @@ def login_function(username:str, password:str) -> dict :
|
||||
'username':username,
|
||||
'password':password
|
||||
}
|
||||
url = 'http://localhost:8000/api/v1/login/access-token'
|
||||
url = 'http://192.168.50.11:8000/api/v1/login/access-token'
|
||||
response = requests.post(url,data=payload)
|
||||
|
||||
return response.text
|
||||
@@ -25,11 +25,15 @@ def login_function(username:str, password:str) -> dict :
|
||||
def register_function(username:str, password:str):
|
||||
"""
|
||||
功能:
|
||||
注册用户,调用注册api进行新用户注册。
|
||||
注册用户,调用注册api进行新用户注册。+
|
||||
参数:
|
||||
username:用户的账号,或者是用户名称
|
||||
password:用户的密码
|
||||
"""
|
||||
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
mcp.run(transport='streamable-http')
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user