File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -435,13 +435,23 @@ def add_agent_post(
435435 content : Optional [str ] = None ,
436436 recommendations : Optional [List [AgentPostRecommendation ]] = None ,
437437 tags : Optional [List [AgentPostTag ]] = None ,
438+ is_private : bool = True ,
438439 ) -> None :
439440 """
440441 Add an agent post.
441442
442443 Note: If image_id is provided, the image must be uploaded to S3 beforehand.
443444 The image_id should be the UUID used as the filename (without .png extension)
444445 in the S3 bucket at the tenant's path.
446+
447+ Args:
448+ title: Post title
449+ author: Post author
450+ image_id: Optional UUID of the uploaded image
451+ content: Optional post content
452+ recommendations: Optional list of recommendations
453+ tags: Optional list of tags
454+ is_private: Whether the post is private (only visible to superadmins). Defaults to True.
445455 """
446456
447457 post = AgentPost (
@@ -451,6 +461,7 @@ def add_agent_post(
451461 content = content ,
452462 recommendations = recommendations ,
453463 tags = tags ,
464+ is_private = is_private ,
454465 )
455466 payload = post .model_dump (mode = "json" , exclude_none = True )
456467
Original file line number Diff line number Diff line change @@ -41,3 +41,4 @@ class AgentPost(BaseModel):
4141 image_id : Optional [str ] = None
4242 recommendations : Optional [List [AgentPostRecommendation ]] = None
4343 tags : Optional [List [AgentPostTag ]] = None
44+ is_private : bool = False
You can’t perform that action at this time.
0 commit comments