Repository: mem0ai/mem0
File: mem0/client/main.py (Python)

Code before:
            Dict containing the exported data
        """
        response = await self.async_client.get("/v1/exports/", params=self._prepare_params(kwargs))
        response.raise_for_status()
        capture_client_event("async_client.get_memory_export", self.sync_client, {"keys": list(kwargs.keys())})
        return response.json()

    @api_error_handler
    async def get_project_details(self, fields: Optional[List[str]]=None) -> Dict[str, Any]:
        if not (self.sync_client.org_id and self.sync_client.project_id):
            raise ValueError("org_id and project_id must be set to access instructions or categories")


        params = self._prepare_params({"fields": fields})
        response = await self.async_client.get(
            f"/api/v1/orgs/organizations/{self.sync_client.org_id}/projects/{self.sync_client.project_id}/",
            params=params,
        )
        response.raise_for_status()
        capture_client_event(
            "async_client.get_project_details", self.sync_client, {"fields": fields}
        )
        return response.json()

    @api_error_handler
    async def update_project_details(self, custom_instructions: Optional[str], custom_categories: Optional[List[str]]) -> Dict[str, Any]:
        if not (self.sync_client.org_id and self.sync_client.project_id):
            raise ValueError("org_id and project_id must be set to update instructions or categories")

        payload = self.sync_client._prepare_params({"custom_instructions": custom_instructions, "custom_categories": custom_categories})
        response = await self.async_client.patch(
            f"/api/v1/orgs/organizations/{self.sync_client.org_id}/projects/{self.sync_client.project_id}/",
            json=payload,
        )
        response.raise_for_status()
        capture_client_event(
            "async_client.update_project_details", self.sync_client, {"custom_instructions": custom_instructions, "custom_categories": custom_categories}
        )
        return response.json()

    async def chat(self):
        raise NotImplementedError("Chat is not implemented yet")


Review comment (suggestion):
```suggestion
    async def update_project(self, custom_instructions: Optional[str], custom_categories: Optional[List[str]]) -> Dict[str, Any]:
```

Code after:

        Returns:
            Dict containing the exported data
        """
        response = await self.async_client.get("/v1/exports/", params=self._prepare_params(kwargs))
        response.raise_for_status()
        capture_client_event("async_client.get_memory_export", self.sync_client, {"keys": list(kwargs.keys())})
        return response.json()

    @api_error_handler
    async def get_project(self, fields: Optional[List[str]]=None) -> Dict[str, Any]:
        if not (self.sync_client.org_id and self.sync_client.project_id):
            raise ValueError("org_id and project_id must be set to access instructions or categories")


        params = self._prepare_params({"fields": fields})
        response = await self.async_client.get(
            f"/api/v1/orgs/organizations/{self.sync_client.org_id}/projects/{self.sync_client.project_id}/",
            params=params,
        )
        response.raise_for_status()
        capture_client_event(
            "async_client.get_project", self.sync_client, {"fields": fields}
        )
        return response.json()

    @api_error_handler
    async def update_project(self, custom_instructions: Optional[str], custom_categories: Optional[List[str]]) -> Dict[str, Any]:
        if not (self.sync_client.org_id and self.sync_client.project_id):
            raise ValueError("org_id and project_id must be set to update instructions or categories")

        payload = self.sync_client._prepare_params({"custom_instructions": custom_instructions, "custom_categories": custom_categories})
        response = await self.async_client.patch(
            f"/api/v1/orgs/organizations/{self.sync_client.org_id}/projects/{self.sync_client.project_id}/",
            json=payload,
        )
        response.raise_for_status()
        capture_client_event(
            "async_client.update_project", self.sync_client, {"custom_instructions": custom_instructions, "custom_categories": custom_categories}
        )
        return response.json()

    async def chat(self):
        raise NotImplementedError("Chat is not implemented yet")