MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / parse_embedding_response

Method parse_embedding_response

api/openai_client.py:257–268  ·  view source on GitHub ↗

r"""Parse the embedding response to a structure Adalflow components can understand. Should be called in ``Embedder``.

(
        self, response: CreateEmbeddingResponse
    )

Source from the content-addressed store, hash-verified

255 )
256
257 def parse_embedding_response(
258 self, response: CreateEmbeddingResponse
259 ) -> EmbedderOutput:
260 r"""Parse the embedding response to a structure Adalflow components can understand.
261
262 Should be called in ``Embedder``.
263 """
264 try:
265 return parse_embedding_response(response)
266 except Exception as e:
267 log.error(f"Error parsing the embedding response: {e}")
268 return EmbedderOutput(data=[], error=str(e), raw_response=response)
269
270 def convert_inputs_to_api_kwargs(
271 self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected