fixed spacing issues

This commit is contained in:
sjay8
2025-03-09 14:22:13 -07:00
parent eb14fe0f61
commit 321c3dafc0
+1 -8
View File
@@ -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 = ""