mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
fix(fireworks): require api_key in FireworksEmbeddings (#37193)
This commit is contained in:
@@ -708,11 +708,7 @@ class ChatFireworks(BaseChatModel):
|
||||
raise ValueError(msg)
|
||||
|
||||
client_params = {
|
||||
"api_key": (
|
||||
self.fireworks_api_key.get_secret_value()
|
||||
if self.fireworks_api_key
|
||||
else None
|
||||
),
|
||||
"api_key": self.fireworks_api_key.get_secret_value(),
|
||||
"base_url": self.fireworks_api_base,
|
||||
"timeout": self.request_timeout,
|
||||
}
|
||||
|
||||
@@ -71,7 +71,11 @@ class FireworksEmbeddings(BaseModel, Embeddings):
|
||||
alias="api_key",
|
||||
default_factory=secret_from_env(
|
||||
"FIREWORKS_API_KEY",
|
||||
default="",
|
||||
error_message=(
|
||||
"You must specify an api key. "
|
||||
"You can pass it an argument as `api_key=...` or "
|
||||
"set the environment variable `FIREWORKS_API_KEY`."
|
||||
),
|
||||
),
|
||||
)
|
||||
"""Fireworks API key.
|
||||
|
||||
Reference in New Issue
Block a user