Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /BerriAI_litellm /litellm /llms /snowflake /common_utils.py
| class SnowflakeBase: | |
| def validate_environment( | |
| self, | |
| headers: dict, | |
| JWT: str | None = None, | |
| ) -> dict: | |
| """ | |
| Return headers to use for Snowflake completion request | |
| Snowflake REST API Ref: https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-llm-rest-api#api-reference | |
| Expected headers: | |
| { | |
| "Content-Type": "application/json", | |
| "Accept": "application/json", | |
| "Authorization": "Bearer " + <JWT>, | |
| "X-Snowflake-Authorization-Token-Type": "KEYPAIR_JWT" | |
| } | |
| """ | |
| if JWT is None: | |
| raise ValueError("Missing Snowflake JWT key") | |
| headers.update( | |
| { | |
| "Content-Type": "application/json", | |
| "Accept": "application/json", | |
| "Authorization": "Bearer " + JWT, | |
| "X-Snowflake-Authorization-Token-Type": "KEYPAIR_JWT", | |
| } | |
| ) | |
| return headers | |
Xet Storage Details
- Size:
- 985 Bytes
- Xet hash:
- a1548d96840c0694c99fa5d4c9f6149a84e80e2a57c561b68722e7cab80a44a2
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.