azad.prompts.dialects.native.test_native_parser Module¶
azad.prompts.dialects.native.test_native_parser ¶
Test suite for the Native dialect parser.
Attributes¶
Classes¶
MockPromptData ¶
Mock prompt data for testing.
Source code in azad/prompts/dialects/native/test_native_parser.py
TestNativeParser ¶
Bases: TestCase
Test suite for the Native dialect parser.
Functions¶
create_tool_call_delta ¶
create_tool_call_delta(tool_id: Optional[str] = None, tool_name: Optional[str] = None, arguments: str = '', tool_type: str = 'function', index: int = 0) -> ChatCompletionDeltaToolCall
Helper to create a tool call delta with the specified properties.
Source code in azad/prompts/dialects/native/test_native_parser.py
test_native_parser_with_realistic_stream ¶
Test parsing a realistic stream of tool call deltas.
Source code in azad/prompts/dialects/native/test_native_parser.py
test_stream_with_long_parameter ¶
Test parsing a stream with a longer parameter value that comes in many pieces.