Search Results for

    Show / Hide Table of Contents

    Class GoogleCodeExecution

    The code execution tool allows the Gemini model to generate and run Python code. The model can then learn iteratively from the code execution results until it arrives at a final output. You can use code execution to build applications that benefit from code-based reasoning. For example, you can use code execution to solve equations or process text. You can also use the libraries included in the code execution environment to perform more specialized tasks. The code execution tool is available for all languages.

    Gemini is only able to execute code in Python. You can still ask Gemini to generate code in another language, but the model can't use the code execution tool to run it.

    Inheritance
    object
    Tool
    GoogleCodeExecution
    Inherited Members
    Tool.Type
    Tool.TryGetToolName(out string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.Google
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public class GoogleCodeExecution : Tool
    Remarks

    Supported models (Single Turn): All Gemini 2.0 and 2.5 models
    Supported models (Bidirectional - Multimodal Live API): Only Flash experimental models
    File input types supported: .png, .jpeg, .csv, .xml, .cpp, .java, .py, .js, .ts
    Plotting libraries supported: Matplotlib, seaborn

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation