Skip to content

Conversation

yunfeng-scale
Copy link
Contributor

@yunfeng-scale yunfeng-scale commented Jul 13, 2023

Support completions_stream API

tested with

from launch import LaunchClient client = LaunchClient(api_key="", endpoint="") for output in client.completions_stream("", "what is deep learning", 17, 0): print(output) 
@yunfeng-scale yunfeng-scale requested review from a team and phil-scale July 13, 2023 04:47
@yunfeng-scale yunfeng-scale merged commit d8bba93 into master Jul 13, 2023
"""
request = {"max_new_tokens": max_new_tokens, "prompt": prompt, "temperature": temperature}
response = requests.post(
url=f"{self.configuration.host}/v1/llm/completions-stream?model_endpoint_name={endpoint_name}",
Copy link
Member

Choose a reason for hiding this comment

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

Hmm not using the autogen?

I guess it's not the end of the world since we've decided to go hand-written for the other client.

Maybe not worth worry about for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

didn't have time to figure out streaming for autogen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants