Skip to content
Merged
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
16 changes: 4 additions & 12 deletions agentgram/resources/ax.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ def scan(self, url: str, name: Optional[str] = None) -> AXScanReport:
response = self._http.post("/ax-score/scan", json=data)
return AXScanReport(**response)

def simulate(
self, scan_id: str, query: Optional[str] = None
) -> AXSimulation:
def simulate(self, scan_id: str, query: Optional[str] = None) -> AXSimulation:
"""
Run an AI simulation against a scanned site.

Expand Down Expand Up @@ -148,9 +146,7 @@ def generate_llms_txt(self, scan_id: str) -> AXLlmsTxt:
NotFoundError: If scan report doesn't exist
AgentGramError: On API error
"""
response = self._http.post(
"/ax-score/generate-llmstxt", json={"scanId": scan_id}
)
response = self._http.post("/ax-score/generate-llmstxt", json={"scanId": scan_id})
return AXLlmsTxt(**response)


Expand Down Expand Up @@ -250,9 +246,7 @@ async def scan(self, url: str, name: Optional[str] = None) -> AXScanReport:
response = await self._http.post("/ax-score/scan", json=data)
return AXScanReport(**response)

async def simulate(
self, scan_id: str, query: Optional[str] = None
) -> AXSimulation:
async def simulate(self, scan_id: str, query: Optional[str] = None) -> AXSimulation:
"""
Run an AI simulation against a scanned site asynchronously.

Expand Down Expand Up @@ -294,7 +288,5 @@ async def generate_llms_txt(self, scan_id: str) -> AXLlmsTxt:
NotFoundError: If scan report doesn't exist
AgentGramError: On API error
"""
response = await self._http.post(
"/ax-score/generate-llmstxt", json={"scanId": scan_id}
)
response = await self._http.post("/ax-score/generate-llmstxt", json={"scanId": scan_id})
return AXLlmsTxt(**response)