qunfei commited on
Commit
8cb6721
·
1 Parent(s): 589c127

adding client

Browse files
Files changed (1) hide show
  1. client.py +6 -6
client.py CHANGED
@@ -13,11 +13,11 @@ class SQLService(ABC):
13
 
14
  class OpenAIService(SQLService):
15
 
16
- def __init__(self, organization, api_key) -> None:
17
  super().__init__()
18
- openai.organization = organization
19
  openai.api_key = api_key
20
 
 
21
  def translate(self, source_db: str, target_db: str, sql: str) -> List:
22
  results = []
23
  try:
@@ -48,8 +48,8 @@ class OpenAIService(SQLService):
48
 
49
  class GoogleT5Service(SQLService):
50
 
51
- def treanslate(self, source_db: str, target_db: str, sql: str) -> List:
52
- pass
53
 
54
  def __init__(self):
55
  ...
@@ -57,8 +57,8 @@ class GoogleT5Service(SQLService):
57
 
58
  class FacebookLLAMAService(SQLService):
59
 
60
- def treanslate(self, source_db: str, target_db: str, sql: str) -> List:
61
- pass
62
 
63
  def __init__(self):
64
  ...
 
13
 
14
  class OpenAIService(SQLService):
15
 
16
+ def __init__(self, api_key) -> None:
17
  super().__init__()
 
18
  openai.api_key = api_key
19
 
20
+
21
  def translate(self, source_db: str, target_db: str, sql: str) -> List:
22
  results = []
23
  try:
 
48
 
49
  class GoogleT5Service(SQLService):
50
 
51
+ def translate(self, source_db: str, target_db: str, sql: str) -> List:
52
+ return ["In Developing now"]
53
 
54
  def __init__(self):
55
  ...
 
57
 
58
  class FacebookLLAMAService(SQLService):
59
 
60
+ def translate(self, source_db: str, target_db: str, sql: str) -> List:
61
+ return ["In facebook waiting list"]
62
 
63
  def __init__(self):
64
  ...