Skip to content

Correct the name of the Json Formatter embeddings node #1236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ private void addOutputToHookMap(String text) {
}

private void addEmbeddingToHookMap(byte[] data, String mimeType) {
if (!currentStepOrHookMap.containsKey("embedding")) {
currentStepOrHookMap.put("embedding", new ArrayList<Map<String, Object>>());
if (!currentStepOrHookMap.containsKey("embeddings")) {
currentStepOrHookMap.put("embeddings", new ArrayList<Map<String, Object>>());
}
Map<String, Object> embedMap = createEmbeddingMap(data, mimeType);
((List<Map<String, Object>>)currentStepOrHookMap.get("embedding")).add(embedMap);
((List<Map<String, Object>>)currentStepOrHookMap.get("embeddings")).add(embedMap);
}

private Map<String, Object> createEmbeddingMap(byte[] data, String mimeType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ public void should_handle_embed_from_a_hooks() throws Throwable {
" \"match\": {\n" +
" \"location\": \"Hooks.before_hook_1()\"\n" +
" },\n" +
" \"embedding\": [\n" +
" \"embeddings\": [\n" +
" {\n" +
" \"mime_type\": \"mime-type;base64\",\n" +
" \"data\": \"AQID\"\n" +
Expand Down