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.

Important

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

  1. In the playground, configure your desired settings.
  2. Click the View code button.

    A dialog opens, displaying a Python code template.

  3. Click Copy code.
  4. 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.
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top