-
Notifications
You must be signed in to change notification settings - Fork 115
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
[Tooling] After migration, Genkit UI doesn't seem to find runtime #1318
Comments
Same issue |
Same here +1 |
Same here |
I was facing similar situation, I was able to solve it. Noticed a few things:
// flows/server.ts
import { genkit } from "genkit";
import { gemini15Flash, googleAI } from "@genkit-ai/googleai";
import { logger } from "genkit/logging";
import { getInputMessageFlow } from "../../flows/input-message/flow";
import { getChatFlow } from "../../flows/chat/flow";
const ai = genkit({
plugins: [
googleAI(),
],
model: gemini15Flash,
});
logger.setLogLevel("debug");
const chatFlow = ai.defineFlow(...);
const inputMessageFlow = ai.defineFlow(...);
ai.startFlowServer({
flows: [
chatFlow,
inputMessageFlow,
],
}); After build |
Note the changes to how to run the Genkit Dev UI: https://firebase.google.com/docs/genkit/migrating-from-0.5#5_run_it The full command is:
Ex:
If you just run |
As I said, I followed the migration guide. I've investigated more in deep and I opened a PR that solves the issue. It's about how runtime files are generated and compatibility with Windows file system. |
@EduardWayland your fix is now released in 0.9.2 https://github.com/firebase/genkit/releases/tag/genkit%400.9.2 |
Bug still exists in 0.9.2 |
I solved the issue by setting the GOOGLE_GENAI_API_KEY inside functions folder via this command: You've to make sure that you're targeting the right project while creating the api key from Google AI Studio Then Inside functions folder I ran this command |
@JimmyOnGitHub I can confirm that the bug is now fixed, ensure you're executing both commands shown in the guide:
The problem that has been fixed is described in the PR. |
I was using Genkit 0.5 and everything was working correctly. Then I migrated to Genkit 0.9 following the guide at https://firebase.google.com/docs/genkit/migrating-from-0.5 and the UI doesn't seem to start up properly.
It opens up with "Waiting to connect to Genkit runtime" and I see it's making requests to "http://localhost:4000/api/getCurrentRuntime?batch=1&input=%7B%7D" in loop, the response is always: HttpCode: 200, body: [{"result":{"data":{}}}].
Here a screenshot of what shows up in the UI:
I have also tried to make a new project from scratch by following the installation guide here: https://firebase.google.com/docs/genkit/get-started, but same result...
Here a snippet of one of the sample code I'm trying to startup:
Is there something I'm missing? Do I need to do some other kind of configuration somewhere else?
The text was updated successfully, but these errors were encountered: