Elffuss BraidHub

kikocis/llama-stack public

d510759522c8 · 562 BRawPermalink
1# Copyright (c) Meta Platforms, Inc. and affiliates.
2# All rights reserved.
3#
4# This source code is licensed under the terms described in the LICENSE file in
5# the root directory of this source tree.
6
7import os
8
9DIR = os.path.dirname(os.path.realpath(__file__))
10CODE_ENV_PREFIX_FILE = os.path.join(DIR, "code_env_prefix.py")
11CODE_ENV_PREFIX = None
12
13
14def get_code_env_prefix() -> str:
15 global CODE_ENV_PREFIX
16
17 if CODE_ENV_PREFIX is None:
18 with open(CODE_ENV_PREFIX_FILE, "r") as f:
19 CODE_ENV_PREFIX = f.read()
20
21 return CODE_ENV_PREFIX