Skip to content

Conversation

@pavelgj
Copy link
Collaborator

@pavelgj pavelgj commented May 6, 2024

const geminiPro = defineAction({
  actionType: 'model',
  name: 'googleai/gemini-pro',
  // ...
}, (input) => {
  // ...
})

or

const geminiPro = defineAction({
  actionType: 'model',
  name: {
    pluginId: 'googleai',
    actionId: 'gemini-pro',
  },
  // ...
}, (input) => {
  // ...
})

this will register this action in the registry under /model/googleai/gemini-pro

Formalized action naming -- there are two types of actions
1. actions provided by plugins - they must be named pluginId/actionId
2. actions not provided by plugins - their name cannot contain slashes (/)

actions not associated with a plugin

const geminiPro = defineAction({
  actionType: 'model',
  name: 'myCustomModel',
  // ...
}, (input) => {
  // ...
})

@pavelgj pavelgj requested review from MichaelDoyle and mbleigh May 6, 2024 15:34
Copy link
Collaborator

@mbleigh mbleigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only had time for a quick glance, but 👍 on the direction.

@pavelgj pavelgj merged commit f4e03bc into main May 6, 2024
@pavelgj pavelgj deleted the pavelgj/defineAction branch May 6, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants