Skip to content

Commit

Permalink
model fallback to gpt-3.5-turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
alizenhom committed Oct 17, 2024
1 parent d467eb1 commit ad7f198
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,15 @@ def non_numerical_value_is_set(value: Optional[Union[bool, str]]):

def get_llm_request_attributes(
kwargs,
model=None,
operation_name=GenAIAttributes.GenAiOperationNameValues.CHAT.value,
):

return {
GenAIAttributes.GEN_AI_OPERATION_NAME: operation_name,
GenAIAttributes.GEN_AI_SYSTEM: GenAIAttributes.GenAiSystemValues.OPENAI.value,
GenAIAttributes.GEN_AI_REQUEST_MODEL: model or kwargs.get("model"),
GenAIAttributes.GEN_AI_REQUEST_MODEL: kwargs.get(
"model", "gpt-3.5-turbo"
),
GenAIAttributes.GEN_AI_REQUEST_TEMPERATURE: kwargs.get("temperature"),
GenAIAttributes.GEN_AI_REQUEST_TOP_P: kwargs.get("p")
or kwargs.get("top_p"),
Expand Down

0 comments on commit ad7f198

Please sign in to comment.