Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
hwchase17 committed Dec 6, 2023
1 parent 098cb7b commit 3c53051
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libs/langchain/langchain/llms/cerebriumai.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from typing import Any, Dict, List, Mapping, Optional
from typing import Any, Dict, List, Mapping, Optional, cast

import requests
from langchain_core.pydantic_v1 import Extra, Field, SecretStr, root_validator
Expand Down Expand Up @@ -92,8 +92,9 @@ def _call(
**kwargs: Any,
) -> str:
headers: Dict = {
"Authorization": self.cerebriumai_api_key
and self.cerebriumai_api_key.get_secret_value(),
"Authorization": cast(
SecretStr, self.cerebriumai_api_key
).get_secret_value(),
"Content-Type": "application/json",
}
params = self.model_kwargs or {}
Expand Down

0 comments on commit 3c53051

Please sign in to comment.