genkit icon indicating copy to clipboard operation
genkit copied to clipboard

[Py] The registry ceased to register models

Open Irillit opened this issue 1 year ago • 3 comments

After the change in PR #2010 the registry ceased to register models; It is probably because of the following change:

- [ ] Fix an incorrect call to register_action in veneer.

Could you return it back as we are blocked by it?

Confirmed by me and Roman on a separate rebased branches of OpenAI and VertexAI.

Irillit avatar Feb 19 '25 19:02 Irillit

From my site it looks the following way:

File "/home/tatsiana.havina/Documents/repo/genkit/py/samples/hello/src/hello.py", line 62, in main print(say_hi('John Doe')) ^^^^^^^^^^^^^^^^^^ File "/home/tatsiana.havina/Documents/repo/genkit/py/packages/genkit/src/genkit/veneer/veneer.py", line 102, in decorator return action.fn(*args, **kwargs).response ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tatsiana.havina/Documents/repo/genkit/py/packages/genkit/src/genkit/core/action.py", line 104, in tracing_wrapper output = fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/home/tatsiana.havina/Documents/repo/genkit/py/samples/hello/src/hello.py", line 46, in say_hi return ai.generate( ^^^^^^^^^^^^ File "/home/tatsiana.havina/Documents/repo/genkit/py/packages/genkit/src/genkit/veneer/veneer.py", line 88, in generate return model_action.fn(GenerateRequest(messages=messages)).response

Irillit avatar Feb 19 '25 19:02 Irillit

Hey @Irillit it appears that define_prompt should define an action of type ActionKind.PROMPT rather than ActionKind.MODEL. Could you please determine why we're running into this error?

yesudeep avatar Feb 20 '25 02:02 yesudeep

I'm sorry, it was the right correction, and problem was in prefix. Nothing should be done from your site.

Irillit avatar Feb 20 '25 17:02 Irillit