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

Make all outputs in "streaming" format #806

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Make all outputs in "streaming" format #806

merged 1 commit into from
Jan 8, 2024

Commits on Jan 8, 2024

  1. Make all outputs in "streaming" format

    Doing this to make it easier for Ryan to parse with a singular unified output format, regardless of whether the model parser actually supports streaming or not.
    
    - moved `runPromptStream` -> `runPrompt`, overriding the old definition of `runPrompt` by now passing in an `enableStreaming` flag
    - still relying on `isStreamingSupported()` function to set the `enableStreaming` param to true or false
    - default to `stream` param being `True` on backend server (however this has no effect for non-streaming models like Dall-E)
    
    ## Test Plan
    Test that both streaming and non-streaming settings work as expected, as well as test that a model which does not support streaming (ex: Dall-E) still works. Now when user hasn't explicitly clicked the "stream" setting, it will default to streaming. However if they explictly toggle it turns off. Follow up we should have the "stream" button auto-enabled to reflect this (doesn't have to actually be in the config, we should just have the UI show it as on by default to match user expectation)
    
    Update: Updated this so that the default value for `stream` is now `true` inside of `OpenAIChatModelParserPromptSchema`, `HuggingFaceTextGenerationParserPromptSchema` and `AnyscaleEndpointPromptSchema`. Couldn't see it defined in `PaLMTextParserPromptSchema`
    
    
    https://github.com/lastmile-ai/aiconfig/assets/151060367/34214a66-0cea-4774-a917-9476359f172c
    Rossdan Craig rossdan@lastmileai.dev committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    5a811c3 View commit details
    Browse the repository at this point in the history