Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / method
_embed
codeintel.embeddings.HttpEmbedder._embed
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 symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| embed_documents | embeddings.py | same file |
| embed_query | embeddings.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| HttpEmbedder | embeddings.py | same file |
codeintel.embeddings.HttpEmbedder._embedbackend/app/codeintel/embeddings.py, lines 266–274Open source
def _embed(self, texts: list[str]) -> list[list[float]]: if self._batch_supported is not False: try: data = self._post("/embed/batch", {"texts": texts}) self._batch_supported = True return [_pad(v, self.dim) for v in data["embeddings"]] except FileNotFoundError: self._batch_supported = False return [_pad(self._post("/embed", {"text": t})["embedding"], self.dim) for t in texts]What the index recorded
- Signature
def _embed(self, texts: list[str]) -> list[list[float]]:- File
backend/app/codeintel/embeddings.py- Lines
- 266–274
- Parser
- python-ast
- Git blob
df7f8202f23ca6ad2c57aca5f09b435eb6486d79- Call sites
- 2 named, 2 resolved, 0 left unlinked
