Skip to content

Commit 25caa1d

Browse files
Merge pull request #54 from tjmlabs/feat/first-release
Feat/first release
2 parents 1bc6017 + a6c1482 commit 25caa1d

File tree

3 files changed

+37
-17
lines changed

3 files changed

+37
-17
lines changed

.github/pull-request-template.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,40 @@
44

55
## Type of change
66

7-
<!-- Please delete options that are not relevant. -->
7+
<!-- Please select ONE option that best describes your changes -->
8+
<!-- Your selection will determine the semantic version bump -->
89

9-
- [ ] Bug fix (non-breaking change which fixes an issue)
10-
- [ ] New feature (non-breaking change which adds functionality)
11-
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12-
- [ ] Internal (changes that do not affect the application's functionality, changes in admin site, documentation improvements, refactor, settings)
10+
- [ ] 🚨 Breaking change - causes existing functionality to break (triggers MAJOR version bump)
11+
- [ ] ✨ New feature - adds functionality in a non-breaking way (triggers MINOR version bump)
12+
- [ ] 🐛 Bug fix - fixes an issue without changing functionality (triggers PATCH version bump)
13+
- [ ] 🏠 Internal - changes that don't affect external functionality (no version bump)
14+
(e.g., refactoring, docs, tests, admin site changes)
1315

14-
## Checklist:
16+
## Release Impact
17+
18+
<!-- The following will be automated based on your type of change selection above -->
19+
- Current version: <!-- e.g., v1.2.3 -->
20+
- Next version will be: <!-- will be automatically determined -->
21+
22+
## Checklist
1523

1624
- [ ] My code follows the style guidelines
1725
- [ ] My code is tested with 99%+ coverage
1826
- [ ] I have commented my code, particularly in hard-to-understand areas
1927
- [ ] My changes generate no new warnings
28+
- [ ] I have updated the documentation to reflect my changes
29+
- [ ] I have added/updated tests to cover my changes
30+
31+
## Breaking Changes
32+
33+
<!-- If you checked "Breaking change" above, please detail the breaks here -->
34+
<!-- This will be included in the release notes -->
35+
36+
## Migration Guide
2037

38+
<!-- If you checked "Breaking change" above, please provide migration instructions -->
39+
<!-- This will be included in the release notes -->
2140

41+
## Additional Notes
2242

23-
## To Do before merging:
24-
- [ ] If applicable, changes have been merged to the cloud branch
25-
- [ ] The readme and documentation have been updated
26-
- [ ] If my changes break or alters current functionality, I have upgraded the SDKs to reflect these changes
43+
<!-- Any other information that would be helpful to reviewers -->

readme.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,11 @@ Please check swagger documentation endpoint (v1/docs) for endpoints. More compre
114114

115115
You can import an openAPI spec (for example for Postman) from the swagger documentation endpoint at `v1/docs/openapi.json`
116116

117-
## Roadmap for 1.0 Release
118-
119-
1. Complete Documentation for the API
120-
121-
## Roadmap for 2.0 Release
117+
## Roadmap
122118

123119
1. Independent Evals for quality + latency
124120
2. Full Demo with Generative Models
125-
3. Typescript SDK
121+
3. Automated SDKs for popular languages other than Python
126122

127123
## Getting Started (Local Setup)
128124

web/api/models.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ async def embed_document(self) -> None:
178178
"""
179179
# Constants
180180
EMBEDDINGS_URL = settings.EMBEDDINGS_URL
181-
EMBEDDINGS_BATCH_SIZE = 6
181+
EMBEDDINGS_BATCH_SIZE = 3
182182
DELAY_BETWEEN_BATCHES = 1 # seconds
183183

184184
# Helper function to send a batch of images to the embeddings service
@@ -227,6 +227,10 @@ async def send_batch(
227227
"Failed to get embeddings from the embeddings service."
228228
)
229229
out = await response.json()
230+
if "output" not in out or "data" not in out["output"]:
231+
raise ValidationError(
232+
f"Failed to get embeddings from the embeddings service. Repsonse: {out}"
233+
)
230234
logger.info(
231235
f"Got embeddings for batch of {len(images)} images. delayTime: {out['delayTime']}, executionTime: {out['executionTime']}"
232236
)
@@ -239,6 +243,9 @@ async def send_batch(
239243
base64_images[i : i + EMBEDDINGS_BATCH_SIZE]
240244
for i in range(0, len(base64_images), EMBEDDINGS_BATCH_SIZE)
241245
]
246+
logger.info(
247+
f"Split document {self.name} into {len(batches)} batches for embedding"
248+
)
242249

243250
try:
244251
# we save the document first, then save the pages

0 commit comments

Comments
 (0)