Skip to content

LlmResource.create() got an unexpected keyword argument, even if LlmResponse includes the value #230

@JustLime

Description

@JustLime

Hey guys!

I want to implement a backup and restore tool for llms. For example, when I backup an existing llm from the API I got the following data structure:

{
...,
"model_temperature": 0.0,
"llm_websocket_url": "wss://api.retellai.com/retell-llm/llm-websocket/llm_id",
...
}

Then, I convert this json response into an LlmResponse type using model_validate_json and then afterwards I use model_dump to create a dict so I can spread it into the LlmResource.create() method.

After trying to restore an llm using LlmResource.create() I got the following error:

LlmResource.create() got an unexpected keyword argument 'api_model_temperature'

The LlmResponse does have a field for the api_model_temperature but not for model_temperature, so I have to rename the key by myself.

Similar stuff for llm_websocket_url: the LlmResource.create() method does not take this parameter even it is included in the API response.

I do not think that this is intended, isn't it?

Thanks in advance for your answer!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions