Package dev.langchain4j.data.message
Class AudioContent
java.lang.Object
dev.langchain4j.data.message.AudioContent
- All Implemented Interfaces:
Content
-
Constructor Summary
ConstructorDescriptionAudioContent
(Audio audio) Create a newAudioContent
from the given Audio.AudioContent
(String url) Create a newAudioContent
from the given url.AudioContent
(String base64Data, String mimeType) Create a newAudioContent
from the given base64 data and mime type.AudioContent
(URI url) Create a newAudioContent
from the given url. -
Method Summary
Modifier and TypeMethodDescriptionaudio()
Get theAudio
.boolean
static AudioContent
Create a newAudioContent
from the given Audio.static AudioContent
Create a newAudioContent
from the given url.static AudioContent
Create a newAudioContent
from the given base64 data and mime type.static AudioContent
Create a newAudioContent
from the given url.int
hashCode()
toString()
type()
Returns the type of content.
-
Constructor Details
-
AudioContent
Create a newAudioContent
from the given url.- Parameters:
url
- the url of the Audio.
-
AudioContent
Create a newAudioContent
from the given url.- Parameters:
url
- the url of the Audio.
-
AudioContent
Create a newAudioContent
from the given base64 data and mime type.- Parameters:
base64Data
- the base64 data of the Audio.mimeType
- the mime type of the Audio.
-
AudioContent
Create a newAudioContent
from the given Audio.- Parameters:
audio
- the audio.
-
-
Method Details
-
type
Description copied from interface:Content
Returns the type of content.Can be used to cast the content to the correct type.
-
audio
Get theAudio
.- Returns:
- the
Audio
.
-
equals
-
hashCode
public int hashCode() -
toString
-
from
Create a newAudioContent
from the given url.- Parameters:
url
- the url of the Audio.- Returns:
- the new
AudioContent
.
-
from
Create a newAudioContent
from the given url.- Parameters:
url
- the url of the Audio.- Returns:
- the new
AudioContent
.
-
from
Create a newAudioContent
from the given base64 data and mime type.- Parameters:
base64Data
- the base64 data of the Audio.mimeType
- the mime type of the Audio.- Returns:
- the new
AudioContent
.
-
from
Create a newAudioContent
from the given Audio.- Parameters:
audio
- the Audio.- Returns:
- the new
AudioContent
.
-