Model catalog to have code examples for text completion along with Vision examples

Hi @maddyAWS ! Following up, the call to create_vision_completion does not need an image input to successfully execute (i.e. the function can be used for solely text completion) given that model is a vision model. create_vision_completion supports image inputs in addition to its text completion capabilities.

For models with only text completion capability, such as Llama 3.1 70b Instruct, you will see the code snippet generated uses a different function - a call to create_completion.

For vision models such as Claude 3.5, if you are using them for just text completion, you can technically use either create_vision_completion or create_completion. We have made some modifications to conditionally render the recommended function based on the use case’s needs!

We’ve modified the examples on Model Catalog to make this flow more intuitive and better distinguish between these two use cases of “Text Completion” and “Vision”. Users can now toggle between the modes Text and Vision for both Transforms and Functions and receive the relevant code snippet to get started.