MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / from_content

Method from_content

examples/mcpserver/memory.py:93–95  ·  view source on GitHub ↗
(cls, content: str, deps: Deps)

Source from the content-addressed store, hash-verified

91
92 @classmethod
93 async def from_content(cls, content: str, deps: Deps):
94 embedding = await get_embedding(content, deps)
95 return cls(content=content, embedding=embedding)
96
97 async def save(self, deps: Deps):
98 async with deps.pool.acquire() as conn:

Callers 1

add_memoryFunction · 0.80

Calls 1

get_embeddingFunction · 0.85

Tested by

no test coverage detected