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

Cleaner model usage #5

Merged
merged 3 commits into from
Nov 22, 2024
Merged

Cleaner model usage #5

merged 3 commits into from
Nov 22, 2024

Conversation

jpwilliams
Copy link
Member

@jpwilliams jpwilliams commented Nov 22, 2024

Summary

Moves some internals around and moves the userland APIs to be able to silently use inngest's models under the hood.

Before

const model = createAgenticOpenAiModel({
  model: openai({ model: "gpt-4" }),
  step,
});

After

// `Openai` casing matching `inngest` and other implemenations
const model = agenticOpenai({ model: "gpt-4", step });

// You can specify the usual options
const model = agenticOpenai({ model: "gpt-4", apiKey: "override", step });

// Or provide a model created elsewhere
const myCheapModel = openai({ model: "gpt-3.5-turbo" });
const model = agenticOpenai({ model: myCheapModel, step });

Also:

  • Added agenticGemini()
  • Moved OpenAI format parsers to a separate module

@jpwilliams jpwilliams self-assigned this Nov 22, 2024
@jpwilliams jpwilliams merged commit 34325aa into main Nov 22, 2024
1 check passed
@jpwilliams jpwilliams deleted the jack/tweaks branch November 22, 2024 16:07
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.

3 participants