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

support reasoning effort flag #1087

Merged
merged 3 commits into from
Feb 2, 2025
Merged

support reasoning effort flag #1087

merged 3 commits into from
Feb 2, 2025

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Feb 2, 2025


Summary of Changes

This commit introduces a new reasoning effort parameter to the codebase. Here's a high-level overview of what was changed:

  • New Property: A new property called reasoningEffort has been added to the public API, specifically in packages/core/src/types/prompt_template.d.ts. This property allows users to specify the level of reasoning effort in their models.

  • Public Facing Changes: The PromptScriptRunOptions interface now includes the reasoningEffort property. This addition is user-facing and will allow developers to directly interact with and utilize the new feature.

  • Implementation Updates: The changes also include minor updates throughout the codebase, ensuring that the new reasoningEffort property is properly handled and integrated where necessary.

AI-generated content by pr-describe may be incorrect

@@ -21,6 +21,7 @@ Options:
-sm, --small-model <string> 'small' alias model
-vm, --vision-model <string> 'vision' alias model
-ma, --model-alias <nameid...> model alias as name=modelid
-re, --reasoning-effort <string> Reasoning effort for o* models (choices: "high", "medium", "low")
-lp, --logprobs enable reporting token probabilities
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space between -re and --reasoning-effort.

AI-generated content by pr-docs-review-commit missing_space may be incorrect

Copy link

github-actions bot commented Feb 2, 2025

LGTM 🚀

The pull request adds a new parameter reasoningEffort to various parts of the application. This enhancement appears to be useful for models that support it, providing additional control over the reasoning process. The diffs across files like server/messages.ts, promptrunner.ts, and others ensure that this new parameter is properly integrated into the existing framework.

Here's a quick summary:

  • Added reasoningEffort to ModelOptions interface.
  • Integrated reasoningEffort into message schemas, handler parameters, and runner functions.
  • Updated TypeScript types in several files which are already ensuring type safety.

The changes are clear and well-integrated. There don't appear to be any functional issues or typos in the provided diffs. The new parameter could be beneficial for certain models and provides flexibility in how the application leverages these models.

With these additions, the application should be better equipped to handle varying degrees of reasoning effort depending on model capabilities and user needs.

AI-generated content by pr-review may be incorrect


The OpenAI reasoning models, the `o1, o3` models, are models that are optimized for reasoning tasks.

```js
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid code block syntax. Expected language identifier after triple backticks.

AI-generated content by pr-docs-review-commit invalid_code_block may be incorrect


The reasoning effort parameter can be set to `low`, `medium`, or `high`.

```js 'reasoningEffort: "high"'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in option description.

AI-generated content by pr-docs-review-commit missing_space may be incorrect

@pelikhan pelikhan merged commit 9d937f2 into main Feb 2, 2025
14 of 15 checks passed
@pelikhan pelikhan deleted the reasoning_effort branch February 2, 2025 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant