Interface ImageToDiagram

All Known Implementing Classes:
DiagramCorrectionProcess, ImageToDiagramProcess

public interface ImageToDiagram
Represents the functionality to convert images to diagrams.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
    static class 
    Represents the state of an agent, specifically tailored for managing diagram-related data and processes.
  • Method Summary

    Modifier and Type
    Method
    Description
    default dev.langchain4j.model.openai.OpenAiChatModel
    Returns an instance of the default OpenAiChatModel.
    default dev.langchain4j.model.openai.OpenAiChatModel
    Retrieves an instance of the OpenAiChatModel configured for vision tasks.
    static dev.langchain4j.model.input.PromptTemplate
    loadPromptTemplate(String resourceName)
    Loads a PromptTemplate from the specified resource name.
  • Method Details

    • getVisionModel

      default dev.langchain4j.model.openai.OpenAiChatModel getVisionModel()
      Retrieves an instance of the OpenAiChatModel configured for vision tasks.
      Returns:
      An OpenAiChatModel object with predefined settings suitable for processing images and videos.
      Throws:
      IllegalArgumentException - if no OPENAI_API_KEY is provided in the system properties.
    • getModel

      default dev.langchain4j.model.openai.OpenAiChatModel getModel()
      Returns an instance of the default OpenAiChatModel.
      Returns:
      a configured OpenAiChatModel with the API key obtained from the system property "OPENAI_API_KEY".
      Throws:
      IllegalArgumentException - if no OPENAI_API_KEY is provided as a system property.
    • loadPromptTemplate

      static dev.langchain4j.model.input.PromptTemplate loadPromptTemplate(String resourceName) throws Exception
      Loads a PromptTemplate from the specified resource name.
      Parameters:
      resourceName - the name of the resource file, must not be null or empty
      Returns:
      the loaded PromptTemplate
      Throws:
      Exception - if the resource is not found or an error occurs during reading