All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkiverse.langchain4j.vertexai.runtime.gemini.GenerateContentRequest Maven / Gradle / Ivy

There is a newer version: 0.21.0
Show newest version
package io.quarkiverse.langchain4j.vertexai.runtime.gemini;

import java.util.List;

public record GenerateContentRequest(List contents, SystemInstruction systemInstruction, List tools,
        GenerationConfig generationConfig) {

    public record Content(String role, List parts) {

        public record Part(String text, FunctionCall functionCall) {

            public static Part ofText(String text) {
                return new Part(text, null);
            }
        }
    }

    public record SystemInstruction(List parts) {

        public static SystemInstruction ofContent(List contents) {
            return new SystemInstruction(contents.stream().map(Part::new).toList());
        }

        public record Part(String text) {

        }
    }

    public record Tool(List functionDeclarations) {

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy