mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 14:43:07 +00:00
feat(core): content block factories + ids + docs + tests (#32316)
## Benefits 1. **Type Safety**: Compile-time validation of required fields and proper type setting 2. **Less Boilerplate**: No need to manually set the `type` field or generate IDs 3. **Input Validation**: Runtime validation prevents common errors (e.g., base64 without MIME type) 4. **Consistent Patterns**: Standardized creation patterns across all block types 5. **Better Developer Experience**: Cleaner, more intuitive API than manual TypedDict construction. Also follows similar other patterns (e.g. `create_react_agent`, `init_chat_model`
This commit is contained in:
1
.github/workflows/codspeed.yml
vendored
1
.github/workflows/codspeed.yml
vendored
@@ -20,6 +20,7 @@ jobs:
|
||||
codspeed:
|
||||
name: 'Benchmark'
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'codspeed-ignore') }}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
||||
Reference in New Issue
Block a user