Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/abetlen/llama-cpp-python
/ env_or_def
Function
env_or_def
examples/low_level_api/Chat.py:7–10 ·
view source on GitHub ↗
(env, default)
Source
from the content-addressed store, hash-verified
5
6
7
def
env_or_def(env, default):
8
if
env in os.environ:
9
return
os.environ[env]
10
return
default
11
12
13
AI_NAME = env_or_def(
"AI_NAME"
,
"ChatLLaMa"
)
Callers
1
Chat.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…