mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-10 15:33:11 +00:00
community[patch]: import flattening fix (#20110)
This PR should make it easier for linters to do type checking and for IDEs to jump to definition of code. See #20050 as a template for this PR. - As a byproduct: Added 3 missed `test_imports`. - Added missed `SolarChat` in to __init___.py Added it into test_import ut. - Added `# type: ignore` to fix linting. It is not clear, why linting errors appear after ^ changes. --------- Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
This commit is contained in:
@@ -32,6 +32,8 @@ class _SolarClient(BaseModel):
|
||||
|
||||
|
||||
class SolarCommon(BaseModel):
|
||||
"""Common configuration for Solar LLMs."""
|
||||
|
||||
_client: _SolarClient
|
||||
base_url: str = SOLAR_SERVICE_URL_BASE
|
||||
solar_api_key: Optional[SecretStr] = Field(default=None, alias="api_key")
|
||||
@@ -92,6 +94,7 @@ class SolarCommon(BaseModel):
|
||||
|
||||
class Solar(SolarCommon, LLM):
|
||||
"""Solar large language models.
|
||||
|
||||
To use, you should have the environment variable
|
||||
``SOLAR_API_KEY`` set with your API key.
|
||||
Referenced from https://console.upstage.ai/services/solar
|
||||
|
Reference in New Issue
Block a user