-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat: Add MaxTokens option for AI model output control #1747
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
base: main
Are you sure you want to change the base?
Conversation
@ksylvan When I
Am I doing something wrong? |
Are you up to date with the latest sources? I fixed this exact problem recently. |
I'll look into this more carefully tomorrow, while I'm at work, Ian. @2b3pro |
I believe, I am up to date on main. Thank you! |
Can you show me the output of |
git remove -v:
git branch:
|
Huh... I think I know what's happening. You don't have the upstream parent set up. Do this instead (using the "gh" cli tool):
And now go into your cloned fork directory:
Now checkout the branch:
Let's verify we are in the branch:
And now we run the change log tool to generate the snippet:
Now, let's see what happened with the commit log:
And let's look at the generated file:
And you can "git push" (or rebase into one commit and push) now. |
I added an issue for myself to improve the CONTRIBUTING document. |
I see you got it working - Thanks for the bug report and the coding contribution, Ian. @2b3pro |
Actually no. I did what you said above but got an error when I tried to Thank you for your patience and assistance. You're most appreciated. |
Oh right... The initial gh clone should be your fork, not mine. gh repo clone 2b3pro/fabric
cd fabric Then follow the rest of the instructions. |
Ok done! |
Tests are failing @2b3pro |
Thanks for your patience, @ksylvan! |
@2b3pro Are you going to put forward another PR for this? If so, please add the internationalization strings in the locale files too. |
- Add --max-tokens flag to control maximum token output - Support max_completion_tokens for OpenAI GPT-5 models - Update all AI providers (Anthropic, OpenAI, Gemini, Ollama, DryRun) - Add MaxTokens configuration to example.yaml - Update help documentation and translations - Add changelog entry for feature danielmiessler#1747
@ksylvan Sure. I updated for gpt-5 which apparently changed how it manages max_tokens. |
- Add --max-tokens flag to control maximum token output - Support max_completion_tokens for OpenAI GPT-5 models - Update all AI providers (Anthropic, OpenAI, Gemini, Ollama, DryRun) - Add MaxTokens configuration to example.yaml - Update help documentation and translations - Add changelog entry for feature danielmiessler#1747
- Add --max-tokens flag to control maximum token output - Support max_completion_tokens for OpenAI GPT-5 models - Update all AI providers (Anthropic, OpenAI, Gemini, Ollama, DryRun) - Add MaxTokens configuration to example.yaml - Update help documentation and translations - Add changelog entry for feature [danielmiessler#1747](https://github.com/2b3pro/fabric/issues/1747)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding the localization support, Ian.
- Add MaxTokens configuration option allowing users to specify the maximum number of tokens to generate in AI model responses - Integrate MaxTokens support across multiple AI providers including Anthropic, Gemini, and Ollama with updated CLI flags and example configuration - Enhance ParseFileChanges function to support both JSON format and markdown format for better compatibility with different AI model outputs - Support max_completion_tokens for GPT-5 models with conditional logic to map MaxTokens to the appropriate parameter for OpenAI API requests - Add test case to validate proper parameter mapping for GPT-5 models according to their specific API requirements - Add internationalization support
@2b3pro Can you see what it would take to also add the max tokens parameter to LM Studio? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what this has to do with the maxTokens change or why this PR is adding 800+ lines to the code base.
This seems like some leftover changes from something else, Ian @2b3pro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like that's from having synced with the more recent versions of fabric
What this Pull Request (PR) does
Introduce a new
MaxTokens
flag and configuration option to allow users to specify the maximum number of tokens to generate in AI model responses.This option is integrated across:
MaxTokens
forMessageNewParams
.MaxOutputTokens
inGenerateContentConfig
.num_predict
option in chat requests.MaxTokens
in the formatted output.Update example configuration to include
maxTokens
with a descriptive comment.