Chapter 7. Exporting your playground configuration
Export your gen AI playground configuration as a Python code template so that you can use it in your local development environment, such as a notebook or IDE.
This code is a template and is not a runnable script. It provides a starting point that shows your configuration, including the model, MCP tools, and RAG files used.
Prerequisites
You have configured your playground instance with the settings that you want to capture in your code template. This includes:
- Selecting a model.
- Setting model parameters, such as model temperature, to your desired values.
- (Optional) Uploading files and enabling the RAG function.
- (Optional) Authorizing and enabling any MCP servers that you intend to use.
Procedure
- In the playground, configure your desired settings.
Click the View code button.
A dialog opens, displaying a Python code template.
- Click Copy code.
- Paste the code into your local development environment.
Verification
- Review the pasted code in your local environment.
- Confirm that the template includes the correct model, MCP tools, and RAG files from your playground configuration.