Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / function

_use_prefixes

codeintel.embeddings._use_prefixes

PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.

PHAROS at 975a38dMIT license

Around this symbol

Search all symbols

Loading

Called by (2)
SymbolFileResolved by
__init__embeddings.pysame file
__init__embeddings.pysame file
Inside (1)
SymbolFileResolved by
embeddingsembeddings.pysame file
codeintel.embeddings._use_prefixesbackend/app/codeintel/embeddings.py, lines 143–150Open source
def _use_prefixes(model_name: str) -> bool:    setting = os.getenv("EMBEDDING_PREFIXES", "auto").lower()    if setting in ("1", "true", "yes", "on"):        return True    if setting in ("0", "false", "no", "off"):        return False    # nomic-embed-text was trained with task prefixes.    return "nomic-embed-text" in model_name

What the index recorded

Signature
def _use_prefixes(model_name: str) -> bool:
File
backend/app/codeintel/embeddings.py
Lines
143–150
Parser
python-ast
Git blob
df7f8202f23ca6ad2c57aca5f09b435eb6486d79
Call sites
2 named, 0 resolved, 2 left unlinked

Read it on GitHub at this commit