Skip to content

Commit e49a839

Browse files
updated several type hints
1 parent b967067 commit e49a839

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

minds/datasources/datasources.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from typing import List, Optional
22

33
from pydantic import BaseModel
4-
import minds.utils as utils
4+
5+
from minds.client import Client
56
import minds.exceptions as exc
7+
import minds.utils as utils
68

79

810
class Datasource(BaseModel):
@@ -16,7 +18,7 @@ class Datasource(BaseModel):
1618

1719

1820
class Datasources:
19-
def __init__(self, client):
21+
def __init__(self, client: Client):
2022
self.api = client.api
2123

2224
def create(

minds/minds.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
from openai import OpenAI
22
from typing import Dict, List, Optional, Union, Iterable
33

4-
import minds.utils as utils
4+
from minds.client import Client
55
import minds.exceptions as exc
6+
import minds.utils as utils
67
# from minds.knowledge_bases import KnowledgeBase, KnowledgeBaseConfig
78

89

910
class Mind:
1011
def __init__(
1112
self,
12-
client,
13-
name,
14-
model_name=None,
15-
provider=None,
16-
parameters=None,
17-
datasources=None,
13+
client: Client,
14+
name: str,
15+
model_name: str,
16+
provider: str,
1817
# knowledge_bases=None,
19-
created_at=None,
20-
updated_at=None,
21-
status=None,
18+
created_at: str,
19+
updated_at: str,
20+
status: str,
21+
datasources: Optional[List[Dict]] = [],
22+
parameters: Optional[Dict] = {},
2223
**kwargs
2324
):
2425
self.api = client.api
@@ -153,7 +154,7 @@ def _stream_response(self, response) -> Iterable[str]:
153154

154155

155156
class Minds:
156-
def __init__(self, client):
157+
def __init__(self, client: Client):
157158
self.api = client.api
158159
self.client = client
159160

0 commit comments

Comments
 (0)