[Feature]: Response format for Open Source Model
What problem does this feature solve?
Due to the Response Format or JSON Output Not Being Limited for Proprietary Models This feature is managed by the inference provider.
This would be great to support enabling or disabling the response format.
Open-Source Libraries or Serving Frameworks
JSON Output can help ensure consistency in the model's output. At least, the response will always return in the correct format. However, the correctness of the position and action still depends on the model.
Moreover, we could fine-tune the enum of the response format to help the model produce more accurate choices or values.
What does the proposed API look like?
It should be similar with other config.
MIDSCENE_USE_RESPONSE_FORMAT=1
Midscene has internally encapsulated input and output, so users do not need to worry about the output format.