Package dev.langchain4j.model.github
Class GitHubModelsStreamingChatModel
java.lang.Object
dev.langchain4j.model.github.GitHubModelsStreamingChatModel
- All Implemented Interfaces:
StreamingChatLanguageModel
Represents a language model, hosted on GitHub Models, that has a chat completion interface, such as gpt-4o.
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 ChatCompletionsClient and ChatCompletionsAsyncClient 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 -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
void
chat
(ChatRequest request, StreamingChatResponseHandler handler) This is the main API to interact with the chat model.provider()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.chat.StreamingChatLanguageModel
chat, chat, defaultRequestParameters, doChat, supportedCapabilities
-
Method Details
-
chat
Description copied from interface:StreamingChatLanguageModel
This is the main API to interact with the chat model.A temporary default implementation of this method is necessary until all
StreamingChatLanguageModel
implementations adopt it. It should be removed once that occurs.- Specified by:
chat
in interfaceStreamingChatLanguageModel
- Parameters:
request
- aChatRequest
, containing all the inputs to the LLMhandler
- aStreamingChatResponseHandler
that will handle streaming response from the LLM
-
listeners
- Specified by:
listeners
in interfaceStreamingChatLanguageModel
-
provider
- Specified by:
provider
in interfaceStreamingChatLanguageModel
-
builder
-