Skip to content

Add model parameter for generating embeddings#19

Merged
caufieldjh merged 2 commits into
mainfrom
17-adding-model-option-for-generate-embeddings-command
May 8, 2026
Merged

Add model parameter for generating embeddings#19
caufieldjh merged 2 commits into
mainfrom
17-adding-model-option-for-generate-embeddings-command

Conversation

@caufieldjh

Copy link
Copy Markdown
Contributor

This pull request updates the embeddings generation pipeline to support selecting any CurateGPT embedding model, including OpenAI and Hugging Face models, via a new --model parameter. The changes clarify when the OPENAI_API_KEY is required, improve help/documentation, and add comprehensive tests for the new behavior.

Major CLI and API improvements:

  • Added a --model (-m) option to the generate-embeddings command, allowing users to specify the CurateGPT embedding model (e.g., openai:text-embedding-3-small or a Hugging Face model). The code now only requires OPENAI_API_KEY if an OpenAI model is selected, and passes the model parameter through all layers to CurateGPT. [1] [2] [3] [4] [5] [6] [7]

Documentation updates:

  • Updated the README.md to reflect the new model selection option, clarify requirements for OPENAI_API_KEY, and improve cost explanations. Added usage examples for specifying a model. [1] [2] [3]

Testing improvements:

  • Added and updated tests to verify that:
    • The CLI only requires OPENAI_API_KEY for OpenAI models.
    • The model parameter is passed to CurateGPT.
    • The default behavior is preserved if no model is specified.
    • The error handling and help messages are correct for all scenarios. [1] [2] [3] [4]

These changes make the embeddings pipeline more flexible, user-friendly, and robust for both OpenAI and non-OpenAI embedding models.

@caufieldjh caufieldjh linked an issue May 8, 2026 that may be closed by this pull request
@caufieldjh caufieldjh merged commit 05b3222 into main May 8, 2026
2 checks passed
@caufieldjh caufieldjh deleted the 17-adding-model-option-for-generate-embeddings-command branch May 8, 2026 20:55
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.

adding model option for generate-embeddings command

1 participant