mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-14 15:52:11 +02:00
release/v2.4 -> master (#844)
This commit is contained in:
parent
a24df8e990
commit
89cabee1b4
386 changed files with 7202 additions and 5741 deletions
|
|
@ -13,10 +13,11 @@ tabulate.PRESERVE_WHITESPACE = True
|
|||
|
||||
default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
|
||||
default_token = os.getenv("TRUSTGRAPH_TOKEN", None)
|
||||
default_workspace = os.getenv("TRUSTGRAPH_WORKSPACE", "default")
|
||||
|
||||
def show_config(url, token=None):
|
||||
def show_config(url, token=None, workspace="default"):
|
||||
|
||||
api = Api(url, token=token).config()
|
||||
api = Api(url, token=token, workspace=workspace).config()
|
||||
|
||||
models = api.list("token-cost")
|
||||
|
||||
|
|
@ -68,6 +69,12 @@ def main():
|
|||
help='Authentication token (default: $TRUSTGRAPH_TOKEN)',
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'-w', '--workspace',
|
||||
default=default_workspace,
|
||||
help=f'Workspace (default: {default_workspace})',
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
|
|
@ -75,6 +82,8 @@ def main():
|
|||
show_config(
|
||||
url=args.api_url,
|
||||
token=args.token,
|
||||
|
||||
workspace=args.workspace,
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue