kobai-sdk 0.2.9__tar.gz → 0.2.10__tar.gz

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.

@@ -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
@@ -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
@@ -10,7 +10,6 @@ kobai/demo_tenant_client.py
10
10
  kobai/spark_client.py
11
11
  kobai/tenant_api.py
12
12
  kobai/tenant_client.py
13
- kobai/test.py
14
13
  kobai_sdk.egg-info/PKG-INFO
15
14
  kobai_sdk.egg-info/SOURCES.txt
16
15
  kobai_sdk.egg-info/dependency_links.txt
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "kobai-sdk"
7
- version = "0.2.9"
7
+ version = "0.2.10"
8
8
  description = "A package that enables interaction with a Kobai tenant."
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Ryan Oattes", email = "ryan@kobai.io" }]
@@ -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)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes