sunholo 0.59.1__tar.gz → 0.59.3__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.
Files changed (106) hide show
  1. {sunholo-0.59.1 → sunholo-0.59.3}/PKG-INFO +2 -2
  2. {sunholo-0.59.1 → sunholo-0.59.3}/setup.py +1 -1
  3. sunholo-0.59.3/sunholo/bots/github_webhook.py +264 -0
  4. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/cli/configs.py +6 -10
  5. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/utils/config_schema.py +3 -2
  6. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo.egg-info/PKG-INFO +2 -2
  7. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo.egg-info/SOURCES.txt +1 -0
  8. {sunholo-0.59.1 → sunholo-0.59.3}/LICENSE.txt +0 -0
  9. {sunholo-0.59.1 → sunholo-0.59.3}/MANIFEST.in +0 -0
  10. {sunholo-0.59.1 → sunholo-0.59.3}/README.md +0 -0
  11. {sunholo-0.59.1 → sunholo-0.59.3}/setup.cfg +0 -0
  12. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/__init__.py +0 -0
  13. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/__init__.py +0 -0
  14. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/chat_history.py +0 -0
  15. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/dispatch_to_qa.py +0 -0
  16. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/fastapi/__init__.py +0 -0
  17. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/fastapi/base.py +0 -0
  18. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/fastapi/qna_routes.py +0 -0
  19. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/flask/__init__.py +0 -0
  20. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/flask/base.py +0 -0
  21. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/flask/qna_routes.py +0 -0
  22. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/langserve.py +0 -0
  23. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/pubsub.py +0 -0
  24. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/route.py +0 -0
  25. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/special_commands.py +0 -0
  26. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/agents/test_chat_history.py +0 -0
  27. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/archive/__init__.py +0 -0
  28. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/archive/archive.py +0 -0
  29. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/auth/__init__.py +0 -0
  30. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/auth/run.py +0 -0
  31. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/bots/__init__.py +0 -0
  32. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/bots/discord.py +0 -0
  33. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/bots/webapp.py +0 -0
  34. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/chunker/__init__.py +0 -0
  35. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/chunker/data_to_embed_pubsub.py +0 -0
  36. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/chunker/doc_handling.py +0 -0
  37. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/chunker/images.py +0 -0
  38. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/chunker/loaders.py +0 -0
  39. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/chunker/message_data.py +0 -0
  40. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/chunker/pdfs.py +0 -0
  41. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/chunker/publish.py +0 -0
  42. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/chunker/splitter.py +0 -0
  43. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/cli/__init__.py +0 -0
  44. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/cli/cli.py +0 -0
  45. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/cli/cli_init.py +0 -0
  46. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/cli/deploy.py +0 -0
  47. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/components/__init__.py +0 -0
  48. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/components/llm.py +0 -0
  49. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/components/prompt.py +0 -0
  50. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/components/retriever.py +0 -0
  51. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/components/vectorstore.py +0 -0
  52. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/__init__.py +0 -0
  53. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/alloydb.py +0 -0
  54. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/database.py +0 -0
  55. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/lancedb.py +0 -0
  56. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/sql/sb/create_function.sql +0 -0
  57. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/sql/sb/create_function_time.sql +0 -0
  58. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/sql/sb/create_table.sql +0 -0
  59. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/sql/sb/delete_source_row.sql +0 -0
  60. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/sql/sb/return_sources.sql +0 -0
  61. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/sql/sb/setup.sql +0 -0
  62. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/static_dbs.py +0 -0
  63. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/database/uuid.py +0 -0
  64. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/embedder/__init__.py +0 -0
  65. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/embedder/embed_chunk.py +0 -0
  66. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/gcs/__init__.py +0 -0
  67. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/gcs/add_file.py +0 -0
  68. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/gcs/download_url.py +0 -0
  69. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/gcs/metadata.py +0 -0
  70. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/langfuse/__init__.py +0 -0
  71. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/langfuse/callback.py +0 -0
  72. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/langfuse/prompts.py +0 -0
  73. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/llamaindex/__init__.py +0 -0
  74. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/llamaindex/generate.py +0 -0
  75. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/llamaindex/import_files.py +0 -0
  76. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/logging.py +0 -0
  77. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/lookup/__init__.py +0 -0
  78. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/lookup/model_lookup.yaml +0 -0
  79. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/patches/__init__.py +0 -0
  80. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/patches/langchain/__init__.py +0 -0
  81. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/patches/langchain/lancedb.py +0 -0
  82. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/patches/langchain/vertexai.py +0 -0
  83. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/pubsub/__init__.py +0 -0
  84. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/pubsub/process_pubsub.py +0 -0
  85. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/pubsub/pubsub_manager.py +0 -0
  86. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/qna/__init__.py +0 -0
  87. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/qna/parsers.py +0 -0
  88. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/qna/retry.py +0 -0
  89. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/streaming/__init__.py +0 -0
  90. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/streaming/content_buffer.py +0 -0
  91. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/streaming/langserve.py +0 -0
  92. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/streaming/streaming.py +0 -0
  93. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/summarise/__init__.py +0 -0
  94. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/summarise/summarise.py +0 -0
  95. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/utils/__init__.py +0 -0
  96. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/utils/big_context.py +0 -0
  97. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/utils/config.py +0 -0
  98. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/utils/gcp.py +0 -0
  99. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/utils/parsers.py +0 -0
  100. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/vertex/__init__.py +0 -0
  101. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo/vertex/init_vertex.py +0 -0
  102. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo.egg-info/dependency_links.txt +0 -0
  103. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo.egg-info/entry_points.txt +0 -0
  104. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo.egg-info/requires.txt +0 -0
  105. {sunholo-0.59.1 → sunholo-0.59.3}/sunholo.egg-info/top_level.txt +0 -0
  106. {sunholo-0.59.1 → sunholo-0.59.3}/test/test_dispatch_to_qa.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.59.1
3
+ Version: 0.59.3
4
4
  Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
5
5
  Home-page: https://github.com/sunholo-data/sunholo-py
6
- Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.59.1.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.59.3.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -1,7 +1,7 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
3
  # Define your base version
4
- version = '0.59.1'
4
+ version = '0.59.3'
5
5
 
6
6
  setup(
7
7
  name='sunholo',
@@ -0,0 +1,264 @@
1
+ # from https://github.com/ray-project/docu-mentor
2
+ import base64
3
+ import httpx
4
+ from dotenv import load_dotenv
5
+ import jwt
6
+ import os
7
+ import time
8
+
9
+ load_dotenv()
10
+
11
+
12
+
13
+ APP_ID = os.environ.get("APP_ID")
14
+ PRIVATE_KEY = os.environ.get("PRIVATE_KEY", "")
15
+
16
+ # with open('private-key.pem', 'r') as f:
17
+ # PRIVATE_KEY = f.read()
18
+
19
+ def generate_jwt():
20
+ payload = {
21
+ "iat": int(time.time()),
22
+ "exp": int(time.time()) + (10 * 60),
23
+ "iss": APP_ID,
24
+ }
25
+ if PRIVATE_KEY:
26
+ jwt_token = jwt.encode(payload, PRIVATE_KEY, algorithm="RS256")
27
+ return jwt_token
28
+ raise ValueError("PRIVATE_KEY not found.")
29
+
30
+
31
+ async def get_installation_access_token(jwt, installation_id):
32
+ url = f"https://api.github.com/app/installations/{installation_id}/access_tokens"
33
+ headers = {
34
+ "Authorization": f"Bearer {jwt}",
35
+ "Accept": "application/vnd.github.v3+json",
36
+ }
37
+ async with httpx.AsyncClient() as client:
38
+ response = await client.post(url, headers=headers)
39
+ return response.json()["token"]
40
+
41
+
42
+ def get_diff_url(pr):
43
+ """GitHub 302s to this URL."""
44
+ original_url = pr.get("url")
45
+ parts = original_url.split("/")
46
+ owner, repo, pr_number = parts[-4], parts[-3], parts[-1]
47
+ return f"https://patch-diff.githubusercontent.com/raw/{owner}/{repo}/pull/{pr_number}.diff"
48
+
49
+
50
+ async def get_branch_files(pr, branch, headers):
51
+ original_url = pr.get("url")
52
+ parts = original_url.split("/")
53
+ owner, repo = parts[-4], parts[-3]
54
+ url = f"https://api.github.com/repos/{owner}/{repo}/git/trees/{branch}?recursive=1"
55
+ async with httpx.AsyncClient() as client:
56
+ response = await client.get(url, headers=headers)
57
+ tree = response.json().get('tree', [])
58
+ files = {}
59
+ for item in tree:
60
+ if item['type'] == 'blob':
61
+ file_url = item['url']
62
+ print(file_url)
63
+ file_response = await client.get(file_url, headers=headers)
64
+ content = file_response.json().get('content', '')
65
+ # Decode the base64 content
66
+ decoded_content = base64.b64decode(content).decode('utf-8')
67
+ files[item['path']] = decoded_content
68
+ return files
69
+
70
+
71
+ async def get_pr_head_branch(pr, headers):
72
+ original_url = pr.get("url")
73
+ parts = original_url.split("/")
74
+ owner, repo, pr_number = parts[-4], parts[-3], parts[-1]
75
+ url = f"https://api.github.com/repos/{owner}/{repo}/pulls/{pr_number}"
76
+
77
+ async with httpx.AsyncClient() as client:
78
+ response = await client.get(url, headers=headers)
79
+
80
+ # Check if the response is successful
81
+ if response.status_code != 200:
82
+ print(f"Error: Received status code {response.status_code}")
83
+ print("Response body:", response.text)
84
+ return ''
85
+
86
+ # Safely get the 'ref'
87
+ data = response.json()
88
+ head_data = data.get('head', {})
89
+ ref = head_data.get('ref', '')
90
+ return ref
91
+
92
+
93
+ def files_to_diff_dict(diff):
94
+ files_with_diff = {}
95
+ current_file = None
96
+ for line in diff.split("\n"):
97
+ if line.startswith("diff --git"):
98
+ current_file = line.split(" ")[2][2:]
99
+ files_with_diff[current_file] = {"text": []}
100
+ elif line.startswith("+") and not line.startswith("+++"):
101
+ files_with_diff[current_file]["text"].append(line[1:])
102
+ return files_with_diff
103
+
104
+
105
+ def parse_diff_to_line_numbers(diff):
106
+ files_with_line_numbers = {}
107
+ current_file = None
108
+ line_number = 0
109
+ for line in diff.split("\n"):
110
+ if line.startswith("diff --git"):
111
+ current_file = line.split(" ")[2][2:]
112
+ files_with_line_numbers[current_file] = []
113
+ line_number = 0
114
+ elif line.startswith("@@"):
115
+ line_number = int(line.split(" ")[2].split(",")[0][1:]) - 1
116
+ elif line.startswith("+") and not line.startswith("+++"):
117
+ files_with_line_numbers[current_file].append(line_number)
118
+ line_number += 1
119
+ elif not line.startswith("-"):
120
+ line_number += 1
121
+ return files_with_line_numbers
122
+
123
+
124
+ def get_context_from_files(files, files_with_line_numbers, context_lines=2):
125
+ context_data = {}
126
+ for file, lines in files_with_line_numbers.items():
127
+ file_content = files[file].split("\n")
128
+ context_data[file] = []
129
+ for line in lines:
130
+ start = max(line - context_lines, 0)
131
+ end = min(line + context_lines + 1, len(file_content))
132
+ context_data[file].append('\n'.join(file_content[start:end]))
133
+ return context_data
134
+
135
+ app = FastAPI()
136
+
137
+
138
+ async def handle_webhook(request: Request):
139
+ data = await request.json()
140
+
141
+ installation = data.get("installation")
142
+ if installation and installation.get("id"):
143
+ installation_id = installation.get("id")
144
+ logger.info(f"Installation ID: {installation_id}")
145
+
146
+ JWT_TOKEN = generate_jwt()
147
+
148
+ installation_access_token = await get_installation_access_token(
149
+ JWT_TOKEN, installation_id
150
+ )
151
+
152
+ headers = {
153
+ "Authorization": f"token {installation_access_token}",
154
+ "User-Agent": "docu-mentor-bot",
155
+ "Accept": "application/vnd.github.VERSION.diff",
156
+ }
157
+ else:
158
+ raise ValueError("No app installation found.")
159
+
160
+ # If PR exists and is opened
161
+ if "pull_request" in data.keys() and (
162
+ data["action"] in ["opened", "reopened"]
163
+ ): # use "synchronize" for tracking new commits
164
+ pr = data.get("pull_request")
165
+
166
+ # Greet the user and show instructions.
167
+ async with httpx.AsyncClient() as client:
168
+ await client.post(
169
+ f"{pr['issue_url']}/comments",
170
+ json={"body": GREETING},
171
+ headers=headers,
172
+ )
173
+ return JSONResponse(content={}, status_code=200)
174
+
175
+ # Check if the event is a new or modified issue comment
176
+ if "issue" in data.keys() and data.get("action") in ["created", "edited"]:
177
+ issue = data["issue"]
178
+
179
+ # Check if the issue is a pull request
180
+ if "/pull/" in issue["html_url"]:
181
+ pr = issue.get("pull_request")
182
+
183
+ # Get the comment body
184
+ comment = data.get("comment")
185
+ comment_body = comment.get("body")
186
+ # Remove all whitespace characters except for regular spaces
187
+ comment_body = comment_body.translate(
188
+ str.maketrans("", "", string.whitespace.replace(" ", ""))
189
+ )
190
+
191
+ # Skip if the bot talks about itself
192
+ author_handle = comment["user"]["login"]
193
+
194
+ # Check if the bot is mentioned in the comment
195
+ if (
196
+ author_handle != "docu-mentor[bot]"
197
+ and "@docu-mentor run" in comment_body
198
+ ):
199
+ async with httpx.AsyncClient() as client:
200
+ # Fetch diff from GitHub
201
+ files_to_keep = comment_body.replace(
202
+ "@docu-mentor run", ""
203
+ ).split(" ")
204
+ files_to_keep = [item for item in files_to_keep if item]
205
+
206
+ logger.info(files_to_keep)
207
+
208
+ url = get_diff_url(pr)
209
+ diff_response = await client.get(url, headers=headers)
210
+ diff = diff_response.text
211
+
212
+ files_with_lines = parse_diff_to_line_numbers(diff)
213
+
214
+ # Get head branch of the PR
215
+ headers["Accept"] = "application/vnd.github.full+json"
216
+ head_branch = await get_pr_head_branch(pr, headers)
217
+
218
+ # Get files from head branch
219
+ head_branch_files = await get_branch_files(pr, head_branch, headers)
220
+ print("HEAD FILES", head_branch_files)
221
+
222
+ # Enrich diff data with context from the head branch.
223
+ context_files = get_context_from_files(head_branch_files, files_with_lines)
224
+
225
+ # Filter the dictionary
226
+ if files_to_keep:
227
+ context_files = {
228
+ k: context_files[k]
229
+ for k in context_files
230
+ if any(sub in k for sub in files_to_keep)
231
+ }
232
+
233
+ # Get suggestions from Docu Mentor
234
+ content, model, prompt_tokens, completion_tokens = \
235
+ ray_mentor(context_files) if ray.is_initialized() else mentor(context_files)
236
+
237
+
238
+ # Let's comment on the PR
239
+ await client.post(
240
+ f"{comment['issue_url']}/comments",
241
+ json={
242
+ "body": f":rocket: Docu Mentor finished "
243
+ + "analysing your PR! :rocket:\n\n"
244
+ + "Take a look at your results:\n"
245
+ + f"{content}\n\n"
246
+ + "This bot is powered by "
247
+ + "[Sunholo Multivac](https://www.sunholo.com/).\n"
248
+ + f"It used the model {model}, used {prompt_tokens} prompt tokens, "
249
+ + f"and {completion_tokens} completion tokens in total."
250
+ },
251
+ headers=headers,
252
+ )
253
+
254
+ @serve.deployment(route_prefix="/")
255
+ @serve.ingress(app)
256
+ class ServeBot:
257
+ @app.get("/")
258
+ async def root(self):
259
+ return {"message": "Docu Mentor reporting for duty!"}
260
+
261
+ @app.post("/webhook/")
262
+ async def handle_webhook_route(self, request: Request):
263
+ return await handle_webhook(request)
264
+
@@ -12,8 +12,8 @@ def validate_config(config, schema):
12
12
  return True
13
13
  except ValidationError as err:
14
14
  error_path = " -> ".join(map(str, err.path))
15
- #print(f"ERROR: Validation error at '{error_path}': {err.message}")
16
- raise ValidationError(f"Validation error at '{error_path}': {err.message}")
15
+ print(f"ERROR: Validation error at '{error_path}': {err.message}")
16
+ return False
17
17
 
18
18
  def list_configs(args):
19
19
  """
@@ -84,16 +84,12 @@ def list_configs(args):
84
84
  print(f"Validating configuration for kind: {kind}")
85
85
  if args.kind == "vacConfig" and args.vac:
86
86
  print(f"Validating vacConfig for {args.vac}")
87
- try:
88
- validate_config(config[args.vac], VAC_SUBCONFIG_SCHEMA)
89
- except ValidationError as e:
90
- print(f"Validation failed for sub-kind: {args.vac} - {str(e)}")
87
+ if not validate_config(config[args.vac], VAC_SUBCONFIG_SCHEMA):
88
+ print(f"Validation failed for sub-kind: {args.vac}")
91
89
  validation_failed = True
92
90
  elif kind in SCHEMAS:
93
- try:
94
- validate_config(config, SCHEMAS[kind])
95
- except ValidationError as e:
96
- print(f"FAIL: Validation failed for kind: {kind} - - {str(e)}")
91
+ if not validate_config(config, SCHEMAS[kind]):
92
+ print(f"FAIL: Validation failed for kind: {kind}")
97
93
  validation_failed = True
98
94
  else:
99
95
  print(f"No schema available to validate configuration for kind: {kind}")
@@ -52,7 +52,8 @@ VAC_SUBCONFIG_SCHEMA = {
52
52
  "cluster": {"type": "string"},
53
53
  "instance": {"type": "string"},
54
54
  "database": {"type": "string"}
55
- }
55
+ },
56
+ "required": ["project_id", "region", "cluster", "instance", "database"]
56
57
  },
57
58
  "secrets": {
58
59
  "type": "array",
@@ -87,7 +88,7 @@ VAC_CONFIG_SCHEMA = {
87
88
  }
88
89
  }
89
90
  },
90
- "required": ["kind", "apiVersion", "gcp_config", "vac"]
91
+ "required": ["kind", "apiVersion", "vac"]
91
92
  }
92
93
 
93
94
  PROMPT_CONFIG_SCHEMA = {
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.59.1
3
+ Version: 0.59.3
4
4
  Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
5
5
  Home-page: https://github.com/sunholo-data/sunholo-py
6
- Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.59.1.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.59.3.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -31,6 +31,7 @@ sunholo/auth/__init__.py
31
31
  sunholo/auth/run.py
32
32
  sunholo/bots/__init__.py
33
33
  sunholo/bots/discord.py
34
+ sunholo/bots/github_webhook.py
34
35
  sunholo/bots/webapp.py
35
36
  sunholo/chunker/__init__.py
36
37
  sunholo/chunker/data_to_embed_pubsub.py
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes