vanna 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
vanna/openai/openai_chat.py
CHANGED
|
@@ -9,14 +9,6 @@ class OpenAI_Chat(VannaBase):
|
|
|
9
9
|
def __init__(self, client=None, config=None):
|
|
10
10
|
VannaBase.__init__(self, config=config)
|
|
11
11
|
|
|
12
|
-
if client is not None:
|
|
13
|
-
self.client = client
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
if config is None and client is None:
|
|
17
|
-
self.client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
|
|
18
|
-
return
|
|
19
|
-
|
|
20
12
|
# default parameters - can be overrided using config
|
|
21
13
|
self.temperature = 0.7
|
|
22
14
|
self.max_tokens = 500
|
|
@@ -42,6 +34,14 @@ class OpenAI_Chat(VannaBase):
|
|
|
42
34
|
"Passing api_version is now deprecated. Please pass an OpenAI client instead."
|
|
43
35
|
)
|
|
44
36
|
|
|
37
|
+
if client is not None:
|
|
38
|
+
self.client = client
|
|
39
|
+
return
|
|
40
|
+
|
|
41
|
+
if config is None and client is None:
|
|
42
|
+
self.client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
|
|
43
|
+
return
|
|
44
|
+
|
|
45
45
|
if "api_key" in config:
|
|
46
46
|
self.client = OpenAI(api_key=config["api_key"])
|
|
47
47
|
|
|
@@ -19,11 +19,11 @@ vanna/mistral/mistral.py,sha256=6NarIVLfh9qxJIyUv_9pdRzbbMfC54gYsqg99Q-K7aA,1514
|
|
|
19
19
|
vanna/ollama/__init__.py,sha256=GW1ek7zw_fpL2yFNgrnN5RNjV2PdkK8CmTmcJF9YpDU,2464
|
|
20
20
|
vanna/ollama/ollama.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
vanna/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
-
vanna/openai/openai_chat.py,sha256=
|
|
22
|
+
vanna/openai/openai_chat.py,sha256=Y3-Fhz9c6D-5vrMR1zGibavAPNPAu-hMTwqGfKhAg3Q,3852
|
|
23
23
|
vanna/openai/openai_embeddings.py,sha256=g4pNh9LVcYP9wOoO8ecaccDFWmCUYMInebfHucAa2Gc,1260
|
|
24
24
|
vanna/types/__init__.py,sha256=Qhn_YscKtJh7mFPCyCDLa2K8a4ORLMGVnPpTbv9uB2U,4957
|
|
25
25
|
vanna/vannadb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
vanna/vannadb/vannadb_vector.py,sha256=f4kddaJgTpZync7wnQi09QdODUuMtiHsK7WfKBUAmSo,5644
|
|
27
|
-
vanna-0.2.
|
|
28
|
-
vanna-0.2.
|
|
29
|
-
vanna-0.2.
|
|
27
|
+
vanna-0.2.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
28
|
+
vanna-0.2.1.dist-info/METADATA,sha256=eHQIAouC_MaJBTnE0_1hb0BdooolK2pdvy3l8m7UafY,9741
|
|
29
|
+
vanna-0.2.1.dist-info/RECORD,,
|
|
File without changes
|