MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / update_project

Method update_project

methods/mem0/client/main.py:953–977  ·  view source on GitHub ↗
(
        self, custom_instructions: Optional[str] = None, custom_categories: Optional[List[str]] = None
    )

Source from the content-addressed store, hash-verified

951
952 @api_error_handler
953 async def update_project(
954 self, custom_instructions: Optional[str] = None, custom_categories: Optional[List[str]] = None
955 ) -> Dict[str, Any]:
956 if not (self.sync_client.org_id and self.sync_client.project_id):
957 raise ValueError("org_id and project_id must be set to update instructions or categories")
958
959 if custom_instructions is None and custom_categories is None:
960 raise ValueError(
961 "Currently we only support updating custom_instructions or custom_categories, so you must provide at least one of them"
962 )
963
964 payload = self.sync_client._prepare_params(
965 {"custom_instructions": custom_instructions, "custom_categories": custom_categories}
966 )
967 response = await self.async_client.patch(
968 f"/api/v1/orgs/organizations/{self.sync_client.org_id}/projects/{self.sync_client.project_id}/",
969 json=payload,
970 )
971 response.raise_for_status()
972 capture_client_event(
973 "async_client.update_project",
974 self.sync_client,
975 {"custom_instructions": custom_instructions, "custom_categories": custom_categories},
976 )
977 return response.json()
978
979 async def chat(self):
980 raise NotImplementedError("Chat is not implemented yet")

Callers

nothing calls this directly

Calls 4

capture_client_eventFunction · 0.90
_prepare_paramsMethod · 0.80
patchMethod · 0.80
jsonMethod · 0.45

Tested by

no test coverage detected