Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions examples/add_agent_post_example.py

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cvec"
version = "1.5.3"
version = "2.0.0"
description = "SDK for CVector Energy"
authors = [{ name = "CVector", email = "support@cvector.energy" }]
readme = "README.md"
Expand Down
41 changes: 0 additions & 41 deletions src/cvec/cvec.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from cvec.http_cache import MAX_CACHE_ENTRIES, CacheEntry, parse_max_age

from cvec.models.agent_post import AgentPost, AgentPostRecommendation, AgentPostTag
from cvec.models.eav_column import EAVColumn
from cvec.models.eav_filter import EAVFilter
from cvec.models.eav_table import EAVTable
Expand Down Expand Up @@ -496,46 +495,6 @@ def get_modeling_metrics_data_arrow(
assert isinstance(result, bytes)
return result

def add_agent_post(
self,
title: str,
author: str,
image_id: Optional[str] = None,
content: Optional[str] = None,
recommendations: Optional[List[AgentPostRecommendation]] = None,
tags: Optional[List[AgentPostTag]] = None,
is_private: bool = True,
) -> None:
"""
Add an agent post.

Note: If image_id is provided, the image must be uploaded to S3 beforehand.
The image_id should be the UUID used as the filename (without .png extension)
in the S3 bucket at the tenant's path.

Args:
title: Post title
author: Post author
image_id: Optional UUID of the uploaded image
content: Optional post content
recommendations: Optional list of recommendations
tags: Optional list of tags
is_private: Whether the post is private (only visible to superadmins). Defaults to True.
"""

post = AgentPost(
title=title,
author=author,
image_id=image_id,
content=content,
recommendations=recommendations,
tags=tags,
is_private=is_private,
)
payload = post.model_dump(mode="json", exclude_none=True)

self._make_request("POST", "/api/agent_posts/add", json_data=payload)

def _login_with_supabase(self, email: str, password: str) -> None:
"""
Login to Supabase and get access/refresh tokens.
Expand Down
10 changes: 0 additions & 10 deletions src/cvec/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
from .agent_post import (
AgentPost,
AgentPostRecommendation,
AgentPostTag,
Severity,
)
from .eav_column import EAVColumn
from .eav_filter import EAVFilter
from .eav_table import EAVTable
from .metric import Metric, MetricDataPoint
from .span import Span

__all__ = [
"AgentPost",
"AgentPostRecommendation",
"AgentPostTag",
"EAVColumn",
"EAVFilter",
"EAVTable",
"Metric",
"MetricDataPoint",
"Severity",
"Span",
]
44 changes: 0 additions & 44 deletions src/cvec/models/agent_post.py

This file was deleted.

2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading