Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model configuration is not loaded from character file #3233

Closed
TbLtzk opened this issue Feb 4, 2025 · 3 comments
Closed

Model configuration is not loaded from character file #3233

TbLtzk opened this issue Feb 4, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@TbLtzk
Copy link

TbLtzk commented Feb 4, 2025

Describe the bug

It is currently not possible to override model configuration parameters via the character file.

To Reproduce

Create a character.json file with the following modelConfig object

    "settings": {
        "secrets": {},
        "modelConfig": {
            "maxInputTokens": 256000,
            "maxOutputTokens": 8196,
            "temperature": 0.2,
            "frequency_penalty": 0.0,
            "presence_penalty": 0.0
        },    
        "voice": {
            "model": "en_US-female-medium"
        }

Expected behavior

The existing code base suggests that an override should be possible: https://github.com/TbLtzk/eliza/blob/bfe4fddffe95ba9f494a8203f7731504c05fe71f/packages/core/src/generation.ts#L373

But the modelConfig object is always undefined, I think because it's not included in the schema.

Additional context

I have a fix for this and could create a pull request: TbLtzk@6216ff9

I renamed max_response_length to maxOutputTokens to be consistent with the modelSettings. Further, I don't think that modelConfig is the ideal name for the object, but this is induced by the existing code base (see permalink above). I did not change that, for now.

@TbLtzk TbLtzk added the bug Something isn't working label Feb 4, 2025
Copy link
Contributor

github-actions bot commented Feb 4, 2025

Hello @TbLtzk! Welcome to the elizaOS community. Thank you for opening your first issue; we appreciate your contribution. You are now an elizaOS contributor!

@TbLtzk
Copy link
Author

TbLtzk commented Feb 4, 2025

There's still a bug in my fix, because I did not rename the max_response_length in types.ts. I'll provide an updated commit...

UPDATE: fixed TbLtzk@6216ff9

@tcm390
Copy link
Collaborator

tcm390 commented Feb 5, 2025

Hi @TbLtzk, would you mind opening a PR for your fix? That would be really helpful. Thanks! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants