Class GitHubModelsEmbeddingModel

java.lang.Object
dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel
dev.langchain4j.model.github.GitHubModelsEmbeddingModel
All Implemented Interfaces:
dev.langchain4j.model.embedding.EmbeddingModel

@Deprecated(since="1.10.0", forRemoval=true) public class GitHubModelsEmbeddingModel extends dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel
Deprecated, for removal: This API element is subject to removal in a future version.
This module is deprecated and will be removed in a future release. Please use the langchain4j-openai-official module instead.
Represents an embedding model, hosted on GitHub Models, such as text-embedding-3-small.

Mandatory parameters for initialization are: gitHubToken (the GitHub Token used for authentication) and modelName (the name of the model to use). You can also provide your own EmbeddingsClient instance, if you need more flexibility.

The list of models, as well as the documentation and a playground to test them, can be found at https://github.com/marketplace/models

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Field Summary

    Fields inherited from class dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel

    dimension
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    dev.langchain4j.model.output.Response<List<dev.langchain4j.data.embedding.Embedding>>
    embedAll(List<dev.langchain4j.data.segment.TextSegment> textSegments)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Embeds the provided text segments, processing a maximum of 16 segments at a time.
    protected Integer
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel

    dimension

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface dev.langchain4j.model.embedding.EmbeddingModel

    addListener, addListeners, embed, embed
  • Method Details

    • embedAll

      public dev.langchain4j.model.output.Response<List<dev.langchain4j.data.embedding.Embedding>> embedAll(List<dev.langchain4j.data.segment.TextSegment> textSegments)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Embeds the provided text segments, processing a maximum of 16 segments at a time. For more information, refer to the documentation here.
      Parameters:
      textSegments - A list of text segments.
      Returns:
      A list of corresponding embeddings.
    • knownDimension

      protected Integer knownDimension()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      knownDimension in class dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel
    • modelName

      public String modelName()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • builder

      public static GitHubModelsEmbeddingModel.Builder builder()
      Deprecated, for removal: This API element is subject to removal in a future version.