Class AudioContent
java.lang.Object
dev.langchain4j.data.message.AudioContent
- All Implemented Interfaces:
Content
-
Constructor Summary
ConstructorsConstructorDescriptionAudioContent(Audio audio) Create a newAudioContentfrom the given Audio.AudioContent(String url) Create a newAudioContentfrom the given url.AudioContent(String base64Data, String mimeType) Create a newAudioContentfrom the given base64 data and mime type.AudioContent(URI url) Create a newAudioContentfrom the given url. -
Method Summary
Modifier and TypeMethodDescriptionaudio()Get theAudio.booleanstatic AudioContentCreate a newAudioContentfrom the given Audio.static AudioContentCreate a newAudioContentfrom the given url.static AudioContentCreate a newAudioContentfrom the given base64 data and mime type.static AudioContentCreate a newAudioContentfrom the given url.inthashCode()toString()type()Returns the type of content.
-
Constructor Details
-
AudioContent
Create a newAudioContentfrom the given url.- Parameters:
url- the url of the Audio.
-
AudioContent
Create a newAudioContentfrom the given url.- Parameters:
url- the url of the Audio.
-
AudioContent
Create a newAudioContentfrom 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 newAudioContentfrom the given Audio.- Parameters:
audio- the audio.
-
-
Method Details
-
type
Description copied from interface:ContentReturns the type of content.Can be used to cast the content to the correct type.
-
audio
-
equals
-
hashCode
-
toString
-
from
Create a newAudioContentfrom the given url.- Parameters:
url- the url of the Audio.- Returns:
- the new
AudioContent.
-
from
Create a newAudioContentfrom the given url.- Parameters:
url- the url of the Audio.- Returns:
- the new
AudioContent.
-
from
Create a newAudioContentfrom 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 newAudioContentfrom the given Audio.- Parameters:
audio- the Audio.- Returns:
- the new
AudioContent.
-