kobai-sdk 0.2.9__py3-none-any.whl → 0.2.10__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.

Potentially problematic release.


This version of kobai-sdk might be problematic. Click here for more details.

kobai/tenant_client.py CHANGED
@@ -79,12 +79,12 @@ class TenantClient:
79
79
 
80
80
  credential = DeviceCodeCredential(client_id=client_id, tenant_id=tenant_id)
81
81
 
82
- access = credential.authenticate()
83
-
84
- oauth_token = access.serialize()
85
- print(oauth_token)
86
- user_name = json.loads(access.serialize())["username"]
87
-
82
+ scope = client_id + "/.default"
83
+ token = credential.get_token("openid profile offline_access " + scope)
84
+ access_token = token.token
85
+ print(access_token)
86
+
87
+ user_name = ""
88
88
  if override_username is not None:
89
89
  user_name = override_username
90
90
 
@@ -101,13 +101,15 @@ class TenantClient:
101
101
 
102
102
  token_request_payload={
103
103
  "tenantId" : tenant_id,
104
- "oauthToken" : oauth_token,
104
+ "accessToken" : access_token,
105
105
  "userName" : user_name
106
106
  }
107
+
107
108
  token_response = self.api_client._TenantAPI__run_post(
108
109
  '/user-mgmt-svcs/auth/oauth/devicecode',
109
110
  token_request_payload
110
111
  )
112
+
111
113
  access_token = token_response.content.decode()
112
114
  self.token = access_token
113
115
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kobai-sdk
3
- Version: 0.2.9
3
+ Version: 0.2.10
4
4
  Summary: A package that enables interaction with a Kobai tenant.
5
5
  Author-email: Ryan Oattes <ryan@kobai.io>
6
6
  License: Apache License
@@ -0,0 +1,13 @@
1
+ kobai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ kobai/ai_query.py,sha256=xZh_OyakU01gIrnzaW4v_TdfzG51nPu0ntXJw1WEnvw,9424
3
+ kobai/ai_rag.py,sha256=8B3HM4GoGVrgxJG678NN4vGaDwZRYnQiK5SCGiMIYkM,15186
4
+ kobai/databricks_client.py,sha256=fyqqMly2Qm0r1AHWsQjkYeNsDdH0G1JSgTkF9KJ55qA,2118
5
+ kobai/demo_tenant_client.py,sha256=wlNc-bdI2wotRXo8ppUOalv4hYdBlek_WzJNARZV-AE,9293
6
+ kobai/spark_client.py,sha256=opM_F-4Ut5Hq5zZjWMuLvUps9sDULvyPNZHXGL8dW1k,776
7
+ kobai/tenant_api.py,sha256=9U6UbxpaAb-kpbuADXx3kbkNKaOzYy0I-GGwbpiCCOk,4212
8
+ kobai/tenant_client.py,sha256=MdPNLjXt5LugKr4u4RSloywEXCXww2bT_3c_C79ZAmk,39613
9
+ kobai_sdk-0.2.10.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
10
+ kobai_sdk-0.2.10.dist-info/METADATA,sha256=qluCitfhbuQ97KkyRUepdF6tNENE9knD1Pt-31lcJqY,19261
11
+ kobai_sdk-0.2.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ kobai_sdk-0.2.10.dist-info/top_level.txt,sha256=ns1El3BrTTHKvoAgU1XtiSaVIudYeCXbEEUVY8HFDZ4,6
13
+ kobai_sdk-0.2.10.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
kobai/test.py DELETED
@@ -1,5 +0,0 @@
1
- import llm_config, ai_query
2
-
3
- llm_config = llm_config.LLMConfig(api_key="sV9LuoA5n0PwqggMXOYMhhZlt56FpgnMXFohimPhD7Ug3CnBLbO8JQQJ99ALACYeBjFXJ3w3AAABACOGZm8X", llm_provider="azure_openai")
4
- llm_config.get_azure_ad_token()
5
- ai_query.followup_question_1(question="abc", data={}, question_name="sample", llm_config=llm_config)
@@ -1,14 +0,0 @@
1
- kobai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- kobai/ai_query.py,sha256=xZh_OyakU01gIrnzaW4v_TdfzG51nPu0ntXJw1WEnvw,9424
3
- kobai/ai_rag.py,sha256=8B3HM4GoGVrgxJG678NN4vGaDwZRYnQiK5SCGiMIYkM,15186
4
- kobai/databricks_client.py,sha256=fyqqMly2Qm0r1AHWsQjkYeNsDdH0G1JSgTkF9KJ55qA,2118
5
- kobai/demo_tenant_client.py,sha256=wlNc-bdI2wotRXo8ppUOalv4hYdBlek_WzJNARZV-AE,9293
6
- kobai/spark_client.py,sha256=opM_F-4Ut5Hq5zZjWMuLvUps9sDULvyPNZHXGL8dW1k,776
7
- kobai/tenant_api.py,sha256=9U6UbxpaAb-kpbuADXx3kbkNKaOzYy0I-GGwbpiCCOk,4212
8
- kobai/tenant_client.py,sha256=ocAjiX7ewb7JjCy7PiISX2in55dLVpkf8HGQv2fE6Fc,39565
9
- kobai/test.py,sha256=LHCKClyFNPgLA1hF62RlDzilaFw2Nd3BWcaLtOc5xdc,320
10
- kobai_sdk-0.2.9.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
11
- kobai_sdk-0.2.9.dist-info/METADATA,sha256=HmKJKi_XVB2MECaQXziP8Cvfe594I09ztK_2Ne7KmHI,19260
12
- kobai_sdk-0.2.9.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
13
- kobai_sdk-0.2.9.dist-info/top_level.txt,sha256=ns1El3BrTTHKvoAgU1XtiSaVIudYeCXbEEUVY8HFDZ4,6
14
- kobai_sdk-0.2.9.dist-info/RECORD,,