This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Publisher { | |
/// Performs the specified closures when publisher events occur. | |
/// | |
/// This is an overloaded version of ``Publisher/handleEvents(receiveSubscription:receiveOutput:receiveCompletion:receiveCancel:receiveRequest:)`` | |
/// that only accepts a closure for the `receiveOutput` events. Use it to inspect events as they pass through the pipeline. | |
/// | |
/// - Parameters: | |
/// - receiveOutput: A closure that executes when the publisher receives a value from the upstream publisher. | |
/// - Returns: A publisher that performs the specified closures when publisher events occur. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {defineTool, generate} from '@genkit-ai/ai'; | |
import {configureGenkit} from '@genkit-ai/core'; | |
import {gemini15ProPreview} from '@genkit-ai/vertexai'; | |
import * as z from 'zod'; | |
import {vertexAI} from '@genkit-ai/vertexai'; | |
configureGenkit({ | |
plugins: [ | |
vertexAI({location: 'us-central1'}), | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {gemini15Flash, googleAI} from '@genkit-ai/googleai'; | |
import {genkit, z} from 'genkit'; | |
import {createInterface} from "node:readline/promises"; | |
import pdf from "pdf-parse"; | |
const ai = genkit({ | |
plugins: [googleAI()], | |
model: gemini15Flash, | |
}); |
OlderNewer