Package org.openapitools.client.model
Class ChunkData
- java.lang.Object
-
- org.openapitools.client.model.ChunkData
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-03-29T12:34:27.506198300-05:00[America/Chicago]", comments="Generator version: 7.4.0") public class ChunkData extends Object
ChunkData
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChunkData.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_CHUNK_HTMLstatic StringSERIALIZED_NAME_CHUNK_VECTORstatic StringSERIALIZED_NAME_FILE_IDstatic StringSERIALIZED_NAME_GROUP_IDSstatic StringSERIALIZED_NAME_GROUP_TRACKING_IDSstatic StringSERIALIZED_NAME_LINKstatic StringSERIALIZED_NAME_METADATAstatic StringSERIALIZED_NAME_SPLIT_AVGstatic StringSERIALIZED_NAME_TAG_SETstatic StringSERIALIZED_NAME_TIME_STAMPstatic StringSERIALIZED_NAME_TRACKING_IDstatic StringSERIALIZED_NAME_UPSERT_BY_TRACKING_IDstatic StringSERIALIZED_NAME_WEIGHT
-
Constructor Summary
Constructors Constructor Description ChunkData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ChunkDataaddChunkVectorItem(Float chunkVectorItem)ChunkDataaddGroupIdsItem(UUID groupIdsItem)ChunkDataaddGroupTrackingIdsItem(String groupTrackingIdsItem)ChunkDataaddTagSetItem(String tagSetItem)ChunkDatachunkHtml(String chunkHtml)ChunkDatachunkVector(List<Float> chunkVector)booleanequals(Object o)ChunkDatafileId(UUID fileId)static ChunkDatafromJson(String jsonString)Create an instance of ChunkData given an JSON stringStringgetChunkHtml()HTML content of the chunk.List<Float>getChunkVector()Chunk_vector is a vector of floats which can be used instead of generating a new embedding.@Valid UUIDgetFileId()File_uuid is the uuid of the file that the chunk is associated with.@Valid List<UUID>getGroupIds()Group ids are the ids of the groups that the chunk should be placed into.List<String>getGroupTrackingIds()Group tracking_ids are the tracking_ids of the groups that the chunk should be placed into.StringgetLink()Link to the chunk.ObjectgetMetadata()Metadata is a JSON object which can be used to filter chunks.BooleangetSplitAvg()Split avg is a boolean which tells the server to split the text in the chunk_html into smaller chunks and average their resulting vectors.List<String>getTagSet()Tag set is a list of tags.StringgetTimeStamp()Time_stamp should be an ISO 8601 combined date and time without timezone.StringgetTrackingId()Tracking_id is a string which can be used to identify a chunk.BooleangetUpsertByTrackingId()Upsert when a chunk with the same tracking_id exists.DoublegetWeight()Weight is a float which can be used to bias search results.ChunkDatagroupIds(List<UUID> groupIds)ChunkDatagroupTrackingIds(List<String> groupTrackingIds)inthashCode()ChunkDatalink(String link)ChunkDatametadata(Object metadata)voidsetChunkHtml(String chunkHtml)voidsetChunkVector(List<Float> chunkVector)voidsetFileId(UUID fileId)voidsetGroupIds(List<UUID> groupIds)voidsetGroupTrackingIds(List<String> groupTrackingIds)voidsetLink(String link)voidsetMetadata(Object metadata)voidsetSplitAvg(Boolean splitAvg)voidsetTagSet(List<String> tagSet)voidsetTimeStamp(String timeStamp)voidsetTrackingId(String trackingId)voidsetUpsertByTrackingId(Boolean upsertByTrackingId)voidsetWeight(Double weight)ChunkDatasplitAvg(Boolean splitAvg)ChunkDatatagSet(List<String> tagSet)ChunkDatatimeStamp(String timeStamp)StringtoJson()Convert an instance of ChunkData to an JSON stringStringtoString()ChunkDatatrackingId(String trackingId)ChunkDataupsertByTrackingId(Boolean upsertByTrackingId)static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues foundChunkDataweight(Double weight)
-
-
-
Field Detail
-
SERIALIZED_NAME_CHUNK_HTML
public static final String SERIALIZED_NAME_CHUNK_HTML
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CHUNK_VECTOR
public static final String SERIALIZED_NAME_CHUNK_VECTOR
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FILE_ID
public static final String SERIALIZED_NAME_FILE_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_GROUP_IDS
public static final String SERIALIZED_NAME_GROUP_IDS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_GROUP_TRACKING_IDS
public static final String SERIALIZED_NAME_GROUP_TRACKING_IDS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LINK
public static final String SERIALIZED_NAME_LINK
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_METADATA
public static final String SERIALIZED_NAME_METADATA
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SPLIT_AVG
public static final String SERIALIZED_NAME_SPLIT_AVG
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TAG_SET
public static final String SERIALIZED_NAME_TAG_SET
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TIME_STAMP
public static final String SERIALIZED_NAME_TIME_STAMP
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TRACKING_ID
public static final String SERIALIZED_NAME_TRACKING_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_UPSERT_BY_TRACKING_ID
public static final String SERIALIZED_NAME_UPSERT_BY_TRACKING_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_WEIGHT
public static final String SERIALIZED_NAME_WEIGHT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getChunkHtml
@Nullable public String getChunkHtml()
HTML content of the chunk. This can also be plaintext. The innerText of the HTML will be used to create the embedding vector. The point of using HTML is for convienience, as some users have applications where users submit HTML content.- Returns:
- chunkHtml
-
setChunkHtml
public void setChunkHtml(String chunkHtml)
-
getChunkVector
@Nullable public List<Float> getChunkVector()
Chunk_vector is a vector of floats which can be used instead of generating a new embedding. This is useful for when you are using a pre-embedded dataset. If this is not provided, the innerText of the chunk_html will be used to create the embedding.- Returns:
- chunkVector
-
getFileId
@Nullable @Valid public @Valid UUID getFileId()
File_uuid is the uuid of the file that the chunk is associated with. This is used to associate chunks with files. This is useful for when you want to delete a file and all of its associated chunks.- Returns:
- fileId
-
setFileId
public void setFileId(UUID fileId)
-
getGroupIds
@Nullable @Valid public @Valid List<UUID> getGroupIds()
Group ids are the ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response.- Returns:
- groupIds
-
getGroupTrackingIds
@Nullable public List<String> getGroupTrackingIds()
Group tracking_ids are the tracking_ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response.- Returns:
- groupTrackingIds
-
getLink
@Nullable public String getLink()
Link to the chunk. This can also be any string. Frequently, this is a link to the source of the chunk. The link value will not affect the embedding creation.- Returns:
- link
-
setLink
public void setLink(String link)
-
getMetadata
@Nullable public Object getMetadata()
Metadata is a JSON object which can be used to filter chunks. This is useful for when you want to filter chunks by arbitrary metadata. Unlike with tag filtering, there is a performance hit for filtering on metadata.- Returns:
- metadata
-
setMetadata
public void setMetadata(Object metadata)
-
getSplitAvg
@Nullable public Boolean getSplitAvg()
Split avg is a boolean which tells the server to split the text in the chunk_html into smaller chunks and average their resulting vectors. This is useful for when you want to create a chunk from a large piece of text and want to split it into smaller chunks to create a more fuzzy average dense vector. The sparse vector will be generated normally with no averaging. By default this is false.- Returns:
- splitAvg
-
setSplitAvg
public void setSplitAvg(Boolean splitAvg)
-
getTagSet
@Nullable public List<String> getTagSet()
Tag set is a list of tags. This can be used to filter chunks by tag. Unlike with metadata filtering, HNSW indices will exist for each tag such that there is not a performance hit for filtering on them.- Returns:
- tagSet
-
getTimeStamp
@Nullable public String getTimeStamp()
Time_stamp should be an ISO 8601 combined date and time without timezone. It is used for time window filtering and recency-biasing search results.- Returns:
- timeStamp
-
setTimeStamp
public void setTimeStamp(String timeStamp)
-
getTrackingId
@Nullable public String getTrackingId()
Tracking_id is a string which can be used to identify a chunk. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.- Returns:
- trackingId
-
setTrackingId
public void setTrackingId(String trackingId)
-
getUpsertByTrackingId
@Nullable public Boolean getUpsertByTrackingId()
Upsert when a chunk with the same tracking_id exists. By default this is false, and the request will fail if a chunk with the same tracking_id exists. If this is true, the chunk will be updated if a chunk with the same tracking_id exists.- Returns:
- upsertByTrackingId
-
setUpsertByTrackingId
public void setUpsertByTrackingId(Boolean upsertByTrackingId)
-
getWeight
@Nullable public Double getWeight()
Weight is a float which can be used to bias search results. This is useful for when you want to bias search results for a chunk. The magnitude only matters relative to other chunks in the chunk's dataset dataset.- Returns:
- weight
-
setWeight
public void setWeight(Double weight)
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOExceptionValidates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to ChunkData
-
fromJson
public static ChunkData fromJson(String jsonString) throws IOException
Create an instance of ChunkData given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ChunkData
- Throws:
IOException- if the JSON string is invalid with respect to ChunkData
-
toJson
public String toJson()
Convert an instance of ChunkData to an JSON string- Returns:
- JSON string
-
-