Skip to content

Commit

Permalink
fix(Google AI Gemini) — Fixed wrong mapping between function executio…
Browse files Browse the repository at this point in the history
…n requests and function execution responses. (langchain4j#1802)
  • Loading branch information
langchain4j committed Sep 24, 2024
1 parent 2929912 commit f6211ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import dev.langchain4j.data.document.Document;
import dev.langchain4j.data.document.DocumentLoader;
import dev.langchain4j.data.document.DocumentParser;
import dev.langchain4j.data.document.source.GcsSource;
import dev.langchain4j.data.document.source.gcs.GcsSource;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package dev.langchain4j.data.document.source;
package dev.langchain4j.data.document.source.gcs;

import com.google.cloud.ReadChannel;
import com.google.cloud.storage.Blob;
import dev.langchain4j.data.document.DocumentSource;
import dev.langchain4j.data.document.Metadata;

import java.io.IOException;
import java.io.InputStream;
import java.nio.channels.Channels;

Expand All @@ -15,12 +13,12 @@ public class GcsSource implements DocumentSource {
private final Metadata metadata;

public GcsSource(Blob blob) {
this.metadata = getMetadataForBlob(blob);
this.inputStream = Channels.newInputStream(blob.reader());
this.metadata = getMetadataForBlob(blob);
}

@Override
public InputStream inputStream() throws IOException {
public InputStream inputStream() {
return inputStream;
}

Expand Down

0 comments on commit f6211ec

Please sign in to comment.