Fix typo
This commit is contained in:
@@ -39,7 +39,7 @@ public class Document {
|
||||
|
||||
private String metadataTemplate = DEFAULT_METADATA_TEMPLATE;
|
||||
|
||||
private String metadataSeperator = "\n";
|
||||
private String metadataSeparator = "\n";
|
||||
|
||||
public Document(String text) {
|
||||
this.text = text;
|
||||
@@ -100,7 +100,7 @@ public class Document {
|
||||
.add(getMetadataTemplate().replace("{key}", key).replace("{value}", value.toString()));
|
||||
}
|
||||
}
|
||||
return String.join(getMetadataSeperator(), metadataStringList);
|
||||
return String.join(getMetadataSeparator(), metadataStringList);
|
||||
}
|
||||
|
||||
public String getTextTemplate() {
|
||||
@@ -111,8 +111,8 @@ public class Document {
|
||||
return metadataTemplate;
|
||||
}
|
||||
|
||||
public String getMetadataSeperator() {
|
||||
return metadataSeperator;
|
||||
public String getMetadataSeparator() {
|
||||
return metadataSeparator;
|
||||
}
|
||||
|
||||
public Map<String, Object> getMetadata() {
|
||||
@@ -140,8 +140,8 @@ public class Document {
|
||||
this.metadataTemplate = metadataTemplate;
|
||||
}
|
||||
|
||||
public void setMetadataSeperator(String metadataSeperator) {
|
||||
this.metadataSeperator = metadataSeperator;
|
||||
public void setMetadataSeparator(String metadataSeparator) {
|
||||
this.metadataSeparator = metadataSeparator;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ public class Embedding {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String messsage = this.embedding.size() == 0 ? "<empty>" : "<has data>";
|
||||
return "Embedding{" + "embedding=" + messsage + ", index=" + index + '}';
|
||||
String message = this.embedding.size() == 0 ? "<empty>" : "<has data>";
|
||||
return "Embedding{" + "embedding=" + message + ", index=" + index + '}';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,9 +61,9 @@ public abstract class AbstractMessage implements Message {
|
||||
}
|
||||
}
|
||||
|
||||
protected AbstractMessage(MessageType messageType, Resource resource, Map<String, Object> messagePropertiets) {
|
||||
protected AbstractMessage(MessageType messageType, Resource resource, Map<String, Object> messageProperties) {
|
||||
this.messageType = messageType;
|
||||
this.properties = messagePropertiets;
|
||||
this.properties = messageProperties;
|
||||
try (InputStream inputStream = resource.getInputStream()) {
|
||||
this.content = StreamUtils.copyToString(inputStream, Charset.defaultCharset());
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface VectorStore {
|
||||
List<Document> similaritySearch(String query, int k);
|
||||
|
||||
/**
|
||||
* @param query The query to send, it will be converted to an embeddeing based on the
|
||||
* @param query The query to send, it will be converted to an embedding based on the
|
||||
* configuration of the vector store.
|
||||
* @param k the top 'k' similar results
|
||||
* @param threshold the lower bound of the similarity score
|
||||
|
||||
@@ -81,7 +81,7 @@ public class AcmeIntegrationTest extends AbstractIntegrationTest {
|
||||
logger.info(String.format("Found %s relevant documents.", similarDocuments.size()));
|
||||
|
||||
// Try the case where not product was specified, so query over whatever docs might
|
||||
// be releveant.
|
||||
// be relevant.
|
||||
|
||||
Message systemMessage = getSystemMessage(similarDocuments);
|
||||
UserMessage userMessage = new UserMessage(userQuery);
|
||||
|
||||
Reference in New Issue
Block a user