-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What feature would you like to see?
Currently, the streaming_listener.py file hardcodes 3 different adapters. If users want to support more streaming adapters, it currently requires hardcoding the adapter in the file and creating the configuration for the adapter in the file.
To make it generic:
- Add a streaming protocol/interface to adapters - Define methods like:
- get_field_start_identifier(field_name) -> str
- get_field_end_identifier(field_name) -> Pattern
- get_start_indicator() -> str
- extract_final_tokens(buffer, field_name) -> str - Move adapter-specific logic into adapter classes - Instead of the StreamListener knowing about each adapter's format,
each adapter would provide its own streaming configuration - Use the adapter instance directly - Replace the adapter_identifiers dict with calls to the adapter instance:
start_identifier = settings.adapter.get_field_start_identifier(self.signature_field_name)
end_identifier = settings.adapter.get_field_end_identifier(self.signature_field_name)
Would you like to contribute?
- Yes, I'd like to help implement this.
- No, I just want to request it.
Additional Context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request