Skip to content
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

AbortSignal support #144

Merged
merged 31 commits into from
Jul 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4e033fd
Add RequestOptions to FileManager
DellaBitta May 7, 2024
e706597
Merge branch 'main' into ddb-request-abort-signal
DellaBitta May 15, 2024
a9440ae
Added RequestOptions to FileManager operations.
DellaBitta May 15, 2024
58bdc31
format
DellaBitta May 15, 2024
291f5bc
remove debug output
DellaBitta May 20, 2024
2d19db5
Added FileManager abort integration tests.
DellaBitta May 20, 2024
2f67539
docs
DellaBitta May 20, 2024
c1f6ddf
Update count-tokens.test.ts
DellaBitta May 20, 2024
c5e8b37
RequestOptions parameter changes. Removal of a cat.
DellaBitta May 20, 2024
95083e1
Created SingleRequestOptions sub interface
DellaBitta May 20, 2024
f4f168c
asynchronous typo.
DellaBitta May 20, 2024
2b30a9e
Rename abortSignal to signal.
DellaBitta May 21, 2024
b125380
docs
DellaBitta May 21, 2024
f7b7b6d
predendence -> precedence typo fix
DellaBitta May 22, 2024
fbc68fd
tests timeout config in conjunction with signal
DellaBitta May 22, 2024
1ec0275
merge main
DellaBitta Jun 5, 2024
1e440f4
docs gen
DellaBitta Jun 5, 2024
7ebd83b
Merge branch 'main' into ddb-request-abort-signal
DellaBitta Jul 16, 2024
b73cb1a
merge main
DellaBitta Jul 16, 2024
20b16fb
ChatSession and GenerativeModel implementation
DellaBitta Jul 17, 2024
c4c8426
remove SRO from some FileManager functions
DellaBitta Jul 17, 2024
c61466a
docs
DellaBitta Jul 17, 2024
6e26b0c
format
DellaBitta Jul 17, 2024
bec6f01
GoogleAIFileManager & GenerativeModel tests.
DellaBitta Jul 17, 2024
5bbbcf5
ChatSessionManager tests
DellaBitta Jul 17, 2024
6abb6d4
extra GoogleAIFileManager variables
DellaBitta Jul 17, 2024
4d7121f
Fix utest failure due to signal now appearing in requests
DellaBitta Jul 18, 2024
5e52c28
yarn docs
DellaBitta Jul 18, 2024
0edc918
AbortSignal in buildFetchOptions only if needed.
DellaBitta Jul 19, 2024
1444eb6
docs
DellaBitta Jul 19, 2024
ac4b721
changeset
DellaBitta Jul 19, 2024
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
Prev Previous commit
Next Next commit
extra GoogleAIFileManager variables
  • Loading branch information
DellaBitta committed Jul 17, 2024
commit 6abb6d44b1986eab32d3802325519ce0ebb06677
4 changes: 0 additions & 4 deletions packages/main/test-integration/node/abort-signal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ describe("signal", function () {
const model = genAI.getGenerativeModel({
model: "gemini-1.5-flash-latest",
});
const fileManager = new GoogleAIFileManager(process.env.GEMINI_API_KEY);
const signal = AbortSignal.timeout(9000);
const requestOptions: SingleRequestOptions = { timeout: 1, signal };
const promise = model.generateContent(
Expand All @@ -142,7 +141,6 @@ describe("signal", function () {
const model = genAI.getGenerativeModel({
model: "gemini-1.5-flash-latest",
});
const fileManager = new GoogleAIFileManager(process.env.GEMINI_API_KEY);
const signal = AbortSignal.timeout(1);
const requestOptions: SingleRequestOptions = { signal };
const promise = model.countTokens("This is not an image", requestOptions);
Expand All @@ -153,7 +151,6 @@ describe("signal", function () {
const model = genAI.getGenerativeModel({
model: "gemini-1.5-flash-latest",
});
const fileManager = new GoogleAIFileManager(process.env.GEMINI_API_KEY);
const signal = AbortSignal.timeout(1);
const requestOptions: SingleRequestOptions = { signal };
const promise = model.embedContent("This is not an image", requestOptions);
Expand All @@ -164,7 +161,6 @@ describe("signal", function () {
const model = genAI.getGenerativeModel({
model: "gemini-1.5-flash-latest",
});
const fileManager = new GoogleAIFileManager(process.env.GEMINI_API_KEY);
const signal = AbortSignal.timeout(1);
const requestOptions: SingleRequestOptions = { signal };
const content1 = {
Expand Down
Loading