Skip to content

feat: add max_tokens option to LLM and LLMStream classes - #1544

Closed
dorlanpabon wants to merge 1 commit into
livekit:mainfrom
dorlanpabon:main
Closed

dorlanpabon wants to merge 1 commit into
livekit:mainfrom
dorlanpabon:main

Conversation

@dorlanpabon

Copy link
Copy Markdown
Contributor

This pull request introduces a new max_tokens parameter to the LLMOptions and related methods in the livekit-plugins-openai plugin. The changes ensure that the max_tokens parameter is properly integrated and used throughout the class methods.

Key changes include:

  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/llm.py:
    • Added max_tokens parameter to the LLMOptions class.
    • Updated the __init__ method to accept and initialize the max_tokens parameter. [1] [2]
    • Modified the with_groq method to include the max_tokens parameter. [1] [2]
    • Included the max_tokens parameter in the _run method to ensure it is passed correctly during execution.

@changeset-bot

changeset-bot Bot commented Feb 23, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 53663cf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


juan.pabon seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

ronanmcnulty pushed a commit to GreyhoundRecyclingIreland/agents that referenced this pull request Jul 23, 2026
Routine + handled on our deployment: post-completion re-emissions are dropped
by design (livekit#6431/livekit#6481) and the worker's capture wrap folds the text into the
stored transcript before this handler runs. The WARNING paged Rollbar on
essentially every Gemini call (cai items livekit#1543/livekit#1544, livekit#1606/livekit#1607).
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.

2 participants