mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-03 19:57:51 +00:00
community: fix DallE hidden open_api_key (#26996)
Thank you for contributing to LangChain! - [ X] **PR title**: "package: description" - Where "package" is whichever of langchain, community, core, etc. is being modified. Use "docs: ..." for purely docs changes, "templates: ..." for template changes, "infra: ..." for CI changes. - Example: "community: add foobar LLM" - [ X] - **Issue:** issue #26941 Additional guidelines: - Make sure optional dependencies are imported within a function. - Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests. - Most PRs should not touch more than one package. - Changes should be backwards compatible. - If you are adding something to community, do not re-import it in langchain. If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17. Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
parent
c6d088bc15
commit
403c0ea801
@ -116,7 +116,9 @@ class DallEAPIWrapper(BaseModel):
|
|||||||
|
|
||||||
if is_openai_v1():
|
if is_openai_v1():
|
||||||
client_params = {
|
client_params = {
|
||||||
"api_key": self.openai_api_key,
|
"api_key": self.openai_api_key.get_secret_value()
|
||||||
|
if self.openai_api_key
|
||||||
|
else None,
|
||||||
"organization": self.openai_organization,
|
"organization": self.openai_organization,
|
||||||
"base_url": self.openai_api_base,
|
"base_url": self.openai_api_base,
|
||||||
"timeout": self.request_timeout,
|
"timeout": self.request_timeout,
|
||||||
|
Loading…
Reference in New Issue
Block a user