From 321c3dafc029d1d3eb12682fa82045b95d39ca4d Mon Sep 17 00:00:00 2001 From: sjay8 Date: Sun, 9 Mar 2025 14:22:13 -0700 Subject: [PATCH] fixed spacing issues --- agentic_security/http_spec.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/agentic_security/http_spec.py b/agentic_security/http_spec.py index 8ce45a8..fafe68c 100644 --- a/agentic_security/http_spec.py +++ b/agentic_security/http_spec.py @@ -44,7 +44,7 @@ class LLMSpec(BaseModel): has_audio: bool = False @classmethod - # class method6 + def from_string(cls, http_spec: str): try: return parse_http_spec(http_spec) @@ -80,8 +80,6 @@ class LLMSpec(BaseModel): if self.has_audio and not encoded_audio: raise ValueError("Audio is required for this request.") - - async def probe( self, prompt: str, encoded_image: str = "", encoded_audio: str = "", files={} ) -> httpx.Response: @@ -163,16 +161,11 @@ def parse_http_spec(http_spec: str) -> LLMSpec: method, url = lines[0].split(" ")[0:2] # Check url validity - valid_url= urlparse(url) # if valid_url.scheme not in ("http", "https") or not valid_url.netloc: # if missing the correct formatting ://, urlparse.netloc will be empty raise InvalidHTTPSpecError(f"Invalid URL: {url}. Ensure it starts with 'http://' or 'https://'") - - - - # Initialize headers and body headers = {} body = ""