Back to the room

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

Code Observatory / method

_post

codeintel.embeddings.HttpEmbedder._post

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

Calls (1)
SymbolFileResolved by
EmbeddingUnavailableembeddings.pysame file
Called by (1)
SymbolFileResolved by
_embedembeddings.pysame file
Inside (1)
SymbolFileResolved by
HttpEmbedderembeddings.pysame file
codeintel.embeddings.HttpEmbedder._postbackend/app/codeintel/embeddings.py, lines 251–264Open source
    def _post(self, path: str, payload: dict) -> dict:        import httpx        try:            resp = httpx.post(                f"{self.base_url}{path}", json=payload, headers=self._headers, timeout=self.timeout            )        except httpx.HTTPError as exc:            raise EmbeddingUnavailable(f"embedding server unreachable: {type(exc).__name__}") from exc        if resp.status_code == 404 and path == "/embed/batch":            raise FileNotFoundError        if resp.status_code >= 400:            raise EmbeddingUnavailable(f"embedding server returned HTTP {resp.status_code}")        return resp.json()

What the index recorded

Signature
def _post(self, path: str, payload: dict) -> dict:
File
backend/app/codeintel/embeddings.py
Lines
251–264
Parser
python-ast
Git blob
df7f8202f23ca6ad2c57aca5f09b435eb6486d79
Call sites
4 named, 1 resolved, 3 left unlinked

Read it on GitHub at this commit