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

fix: add length check for toolRequestParts in fromOpenAiChoice #138

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules/
.nx/
lib/
# lib/
.env
.vscode/launch.json
plugins/.DS_Store
Expand Down
20 changes: 20 additions & 0 deletions examples/lib/genkit.config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/lib/genkit.config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

127 changes: 127 additions & 0 deletions examples/lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions plugins/convex/lib/index.d.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { EmbedderArgument } from '@genkit-ai/ai/embedder';
import { PluginProvider } from '@genkit-ai/core';
import * as z from 'zod';

/**
* Copyright 2024 The Fire Company
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

interface Params<EmbedderCustomOptions extends z.ZodTypeAny> {
indexName: string;
embedder: EmbedderArgument<EmbedderCustomOptions>;
embedderOptions?: z.infer<EmbedderCustomOptions>;
}
declare function convexVectorstore<EmbedderCustomOptions extends z.ZodTypeAny>(params: Params<EmbedderCustomOptions>[]): PluginProvider;

export { convexVectorstore, convexVectorstore as default };
28 changes: 28 additions & 0 deletions plugins/convex/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { EmbedderArgument } from '@genkit-ai/ai/embedder';
import { PluginProvider } from '@genkit-ai/core';
import * as z from 'zod';

/**
* Copyright 2024 The Fire Company
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

interface Params<EmbedderCustomOptions extends z.ZodTypeAny> {
indexName: string;
embedder: EmbedderArgument<EmbedderCustomOptions>;
embedderOptions?: z.infer<EmbedderCustomOptions>;
}
declare function convexVectorstore<EmbedderCustomOptions extends z.ZodTypeAny>(params: Params<EmbedderCustomOptions>[]): PluginProvider;

export { convexVectorstore, convexVectorstore as default };
62 changes: 62 additions & 0 deletions plugins/convex/lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions plugins/convex/lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions plugins/convex/lib/index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
import { genkitPlugin } from "@genkit-ai/core";
function convexVectorstore(params) {
const plugin = genkitPlugin(
"convexVectorstore",
(params2) => __async(this, null, function* () {
return {
// retrievers: params.map((p) => configureDevLocalRetriever(p)),
};
})
);
return plugin(params);
}
var src_default = convexVectorstore;
export {
convexVectorstore,
src_default as default
};
//# sourceMappingURL=index.mjs.map
1 change: 1 addition & 0 deletions plugins/convex/lib/index.mjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions plugins/hnsw/lib/actions/index.d.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { IndexerFlowOptions, PluginOptions, RetrieverFlowOptions } from '../interfaces/index.mjs';

/**
* Copyright 2024 The Fire Company
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

declare const hnswIndexerAction: (flowOptions: IndexerFlowOptions, pluginOptions: PluginOptions) => Promise<string>;
declare const hnswRetrieverAction: (flowOptions: RetrieverFlowOptions, pluginOptions: PluginOptions) => Promise<string>;

export { hnswIndexerAction, hnswRetrieverAction };
Loading