Refactor pluginrun config
How is a PluginRun config stored?
Example of a config we would want to store. "run my sentiment model on whatsapp Messages"
{
"model_name": "cardiffnlp/roberta-xml-sentiment",
"search_query": {
"type": "Message",
"service": "whatsapp"
}
}
Saving + defining Config:
- Config
- Bad current solution: Serialize configs as json string to pod
- Clients cannot communicate that property is a json, and not regular string
- Confusing interface for devs
- Fast solution: Config as item, each plugin has its own config type (SentimentPluginConfig)
- Better solution: json properties (or similar). Could even be a string, but with annotation that its json (similar to DateTime <-> Integer)
- Bad current solution: Serialize configs as json string to pod
Config as Item:
- Issue: config.query is a dict (not a string)
- Issue: can we make pluginrun -- config --> Config type Any? What are pros/cons?
- how to communicate schema of a config at installing plugin