update README_V1.md

This commit is contained in:
Mason Daugherty 2025-08-05 11:03:28 -04:00
parent 485b0b36ab
commit b94fb8c086
No known key found for this signature in database

View File

@ -5,11 +5,9 @@
The standard tests v1 package provides comprehensive testing for chat models that support the new content blocks format. This includes: The standard tests v1 package provides comprehensive testing for chat models that support the new content blocks format. This includes:
- **Streaming support**: Content blocks in streaming responses - **Streaming support**: Content blocks in streaming responses
- **Multimodal content**: Text, images, video, audio, and file content blocks - **Multimodal content**: `Text`, `Image`, `Video`, `Audio`, and `File` `ContentBlock`s
- **Reasoning content**: Structured reasoning steps as content blocks - **Reasoning content**: Reasoning steps as `ReasoningContentBlock`
- **Enhanced tool calling**: Tool calls as content blocks with richer metadata - **Provider-specific extensions**: `NonStandardContentBlock` for unique provider features
- **Structured annotations**: Citations, reasoning blocks, and custom annotations
- **Provider-specific extensions**: Non-standard content blocks for custom functionality
## Usage ## Usage
@ -101,7 +99,7 @@ class TestYourChatModelV1Integration(ChatModelV1IntegrationTests):
## Test Categories ## Test Categories
### Unit Tests (`ChatModelV1UnitTests`) ### Unit Tests (`ChatModelV1Tests`)
- Content block format validation - Content block format validation
- Ser/deserialization - Ser/deserialization
@ -143,16 +141,7 @@ class TestYourChatModelV1Integration(ChatModelV1IntegrationTests):
return True # Enable v1 features return True # Enable v1 features
``` ```
3. **Set feature flags** based on your model's capabilities 3. **Set feature flags** based on your chat model's capabilities
## Backward Compatibility
The v1 tests maintain full backward compatibility:
- Legacy string content is still tested
- Mixed message formats (legacy + content blocks) are validated
- All original test functionality is preserved
- Models can gradually adopt content blocks features
## Examples ## Examples
@ -161,11 +150,9 @@ See the test files in `tests/unit_tests/test_chat_models_v1.py` and `tests/integ
## Best Practices ## Best Practices
1. **Start with basic content blocks** (text) and gradually enable advanced features 1. **Start with basic content blocks** (text) and gradually enable advanced features
2. **Use feature flags** to selectively enable tests based on your model's capabilities 2. **Test error handling** for unsupported content block types
3. **Test error handling** for unsupported content block types 3. **Validate serialization** to persist message histories (passing back in content blocks)
4. **Validate serialization** to persist message histories (passing back in content blocks) 4. **Test streaming** if your model supports it with content blocks
5. **Benchmark performance** with content blocks vs. legacy format
6. **Test streaming** if your model supports it with content blocks
## Contributing ## Contributing
@ -176,4 +163,4 @@ When new content block types or features are added:
3. Add configuration properties for the feature 3. Add configuration properties for the feature
4. Implement corresponding test methods 4. Implement corresponding test methods
5. Update this documentation 5. Update this documentation
6. Add examples in the test files 6. Add examples in the test files (`tests/unit_tests/test_chat_models_v1.py` and `tests/integration_tests/test_chat_models_v1.py`)