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

Add Token Streaming in AGS , Support Env variables #5659

Merged
merged 20 commits into from
Feb 25, 2025
Merged

Conversation

victordibia
Copy link
Collaborator

@victordibia victordibia commented Feb 22, 2025

This PR has 3 main improvements.

  • Token streaming
  • Adds support for environment variables in the app settings
  • Updates AGS to persist Gallery entry in db.

Adds Token Streaming in AGS.

Agentchat now supports streaming of tokens via ModelClientStreamingChunkEvent . This PR is to track progress on supporting that in the AutoGen Studio UI.

If model_client_stream is enabled in an assitant agent, then token will be streamed in UI.

streaming_assistant = AssistantAgent(
    name="assistant",
    model_client=model_client,
    system_message="You are a helpful assistant.",
    model_client_stream=True,  # Enable streaming tokens.
)
ags_streaming_720.mov

Env Variables

Also adds support for env variables in AGS Settings

You can set env variables that are loaded just before a team is run. Handy to set variable to be used by tools etc.

image

Note: the set variables are available to the server process.

Why are these changes needed?

Related issue number

Closes #5627
Closes #5662
Closes #5619

Checks

Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.66%. Comparing base (ca86906) to head (e8fb602).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5659   +/-   ##
=======================================
  Coverage   75.66%   75.66%           
=======================================
  Files         171      171           
  Lines       10578    10578           
=======================================
  Hits         8004     8004           
  Misses       2574     2574           
Flag Coverage Δ
unittests 75.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@victordibia victordibia changed the title Add Token Streaming in AGS Add Token Streaming in AGS , Support Env variables Feb 23, 2025
@victordibia victordibia enabled auto-merge (squash) February 25, 2025 06:44
@victordibia victordibia merged commit fbe94dd into main Feb 25, 2025
54 checks passed
@victordibia victordibia deleted the steaming_ags_vd branch February 25, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants