-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add AWS params (box/box-openapi#478)
- Loading branch information
1 parent
6383dda
commit 8fe5147
Showing
9 changed files
with
90 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ "engineHash": "2efc8ab", "specHash": "e798cb1", "version": "1.5.1" } | ||
{ "engineHash": "2efc8ab", "specHash": "90cf4e4", "version": "1.5.1" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from enum import Enum | ||
|
||
from typing import Optional | ||
|
||
from box_sdk_gen.internal.base_object import BaseObject | ||
|
||
|
||
class AiLlmEndpointParamsAwsTypeField(str, Enum): | ||
AWS_PARAMS = 'aws_params' | ||
|
||
|
||
class AiLlmEndpointParamsAws(BaseObject): | ||
_discriminator = 'type', {'aws_params'} | ||
|
||
def __init__( | ||
self, | ||
*, | ||
type: AiLlmEndpointParamsAwsTypeField = AiLlmEndpointParamsAwsTypeField.AWS_PARAMS.value, | ||
temperature: Optional[float] = None, | ||
top_p: Optional[float] = None, | ||
**kwargs | ||
): | ||
""" | ||
:param type: The type of the AI LLM endpoint params object for AWS. | ||
This parameter is **required**., defaults to AiLlmEndpointParamsAwsTypeField.AWS_PARAMS.value | ||
:type type: AiLlmEndpointParamsAwsTypeField, optional | ||
:param temperature: What sampling temperature to use, between 0 and 1. Higher values like 0.8 will make the output more random, | ||
while lower values like 0.2 will make it more focused and deterministic. | ||
We generally recommend altering this or `top_p` but not both., defaults to None | ||
:type temperature: Optional[float], optional | ||
:param top_p: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results | ||
of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability | ||
mass are considered. We generally recommend altering this or temperature but not both., defaults to None | ||
:type top_p: Optional[float], optional | ||
""" | ||
super().__init__(**kwargs) | ||
self.type = type | ||
self.temperature = temperature | ||
self.top_p = top_p |