Merge remote-tracking branch 'origin/main' into MVP
# Conflicts: # src/service/aios_shell/aios_shell.py
This commit is contained in:
@@ -356,10 +356,13 @@ class AIOS_Shell:
|
||||
pipelines = KnowledgePipelineManager.get_instance().get_pipelines()
|
||||
print_formatted_text("\r\n".join(pipeline.get_name() for pipeline in pipelines))
|
||||
if sub_cmd == "journal":
|
||||
name = args[1]
|
||||
topn = 10 if len(args) == 2 else int(args[2])
|
||||
journals = [str(journal) for journal in KnowledgePipelineManager.get_instance().get_pipeline(name).get_journal().latest_journals(topn)]
|
||||
print_formatted_text("\r\n".join(str(journal) for journal in journals))
|
||||
try:
|
||||
name = args[1]
|
||||
topn = 10 if len(args) == 2 else int(args[2])
|
||||
journals = [str(journal) for journal in KnowledgePipelineManager.get_instance().get_pipeline(name).get_journal().latest_journals(topn)]
|
||||
print_formatted_text("\r\n".join(str(journal) for journal in journals))
|
||||
except ValueError:
|
||||
return FormattedText([("class:title", f"/knowledge journal failed: {args[1]} is not a valid integer.\n")])
|
||||
if sub_cmd == "query":
|
||||
if len(args) < 2:
|
||||
return show_text
|
||||
@@ -404,8 +407,8 @@ class AIOS_Shell:
|
||||
if len(args) < 4:
|
||||
return show_text
|
||||
|
||||
model_name = args[3]
|
||||
url = args[4]
|
||||
model_name = args[2]
|
||||
url = args[3]
|
||||
ComputeNodeConfig.get_instance().remove_node("llama", url, model_name)
|
||||
ComputeNodeConfig.get_instance().save()
|
||||
else:
|
||||
@@ -760,6 +763,7 @@ async def main():
|
||||
'/disable $feature',
|
||||
'/node add llama $model_name $url',
|
||||
'/node rm llama $model_name $url',
|
||||
'/node list',
|
||||
'/show',
|
||||
'/exit',
|
||||
'/help'], ignore_case=True)
|
||||
|
||||
@@ -35,10 +35,15 @@ def apply_storage():
|
||||
socks.set_default_proxy(socks.SOCKS5, host, int(port), username = username, password = password)
|
||||
socket.socket = socks.socksocket
|
||||
logger.info(f"proxy {host_url} will be used.")
|
||||
case "http":
|
||||
(host, port) = host.split(":")
|
||||
socks.set_default_proxy(socks.HTTP, host, int(port), username = username, password = password)
|
||||
socket.socket = socks.socksocket
|
||||
logger.info(f"proxy {host_url} will be used.")
|
||||
case _:
|
||||
logger.error(f"the proxy type ({proxy_type}) has not support. proxy will not be used.")
|
||||
|
||||
|
||||
def declare_user_config():
|
||||
user_config = AIStorage.get_instance().get_user_config()
|
||||
user_config.add_user_config("proxy", "set your proxy service as 'proxy_type@host:port@username@password', 'proxy_type' = 'socks5'", True, None)
|
||||
user_config.add_user_config("proxy", "set your proxy service as 'proxy_type@host:port@username@password', 'proxy_type' = 'socks5|http'", True, None)
|
||||
|
||||
Reference in New Issue
Block a user