Skip to content

Commit

Permalink
fix: Resolved the list typing problem
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan committed Oct 24, 2024
1 parent 200efeb commit 0ee487c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions upsonic/remote/on_prem.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import ast
from functools import wraps


from typing import List

import pickle
import os
Expand Down Expand Up @@ -363,7 +363,7 @@ def install_package(self, package:str) -> None:
self._log(f"Installing {package} to default_dir")
pip(["install", package])

def extract_the_requirements(self, key:str)-> list[str]:
def extract_the_requirements(self, key:str)-> List[str]:
the_requirements = self.get_requirements(key)
elements = []
for each in the_requirements.split(","):
Expand Down Expand Up @@ -1437,15 +1437,15 @@ def check_function(self, value, print_prompts=False,model: Optional[str] = None)
return True
return similarity_explanation

def search_by_documentation(self, question:str) -> list[str]:
def search_by_documentation(self, question:str) -> List[str]:
data = {"question": question}
response = self._send_request("POST", "/search_by_documentation", data)
result = []
for i in response:
result.append(i[0])
return result

def search(self, question:str) -> list[str]:
def search(self, question:str) -> List[str]:
return self.search_by_documentation(question)

def get_default_ai_model(self) -> str:
Expand Down

0 comments on commit 0ee487c

Please sign in to comment.