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

feat: Allow to update OpenAI key without having to recreate the wrapper #246

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

davidmigloz
Copy link
Owner

@davidmigloz davidmigloz commented Nov 23, 2023

You can now update the OpenAI key at any moment:

final llm = OpenAI(); // You can instantiate without a key

final key = getKeyFromUser();  // Ask user for the key

llm.apiKey = key; // Update key

lllm.invoke(...); // Use the wrapper

Supported in:

  • OpenAI
  • ChatOpenAI
  • OpenAIEmbeddings
  • OpenAIDallETool

@davidmigloz davidmigloz self-assigned this Nov 23, 2023
@davidmigloz davidmigloz added t:enhancement New feature or request c:llms Models and integrations. c:chat-models Chat models. c:tools Tools. c:embeddings Embeddings. p:langchain_openai langchain_openai package. labels Nov 23, 2023
@davidmigloz davidmigloz merged commit 05739bd into main Nov 23, 2023
1 check passed
@davidmigloz davidmigloz deleted the openai-key branch November 23, 2023 08:04
@davidmigloz davidmigloz added this to the v0.2.0 milestone Nov 23, 2023
KennethKnudsen97 pushed a commit to KennethKnudsen97/langchain_dart that referenced this pull request Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:chat-models Chat models. c:embeddings Embeddings. c:llms Models and integrations. c:tools Tools. p:langchain_openai langchain_openai package. t:enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant