Skip to content

Conversation

@steamship-developers
Copy link
Contributor

DO NOT COMMIT.

Only for review / collaboration purposes.

Copy link

@eob eob left a comment

Choose a reason for hiding this comment

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

LGTM!

def generate(self, **prompt_args) -> str:
"""Generate text from prompt parameters."""
llm_config = {
"max_words": 30, # Controls length of generated output.
Copy link

Choose a reason for hiding this comment

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

nit - spacing is funny with the comments here



# Try it out locally by running this file!
# You'll need to set the STEAMSHIP_API_KEY environment variable
Copy link

Choose a reason for hiding this comment

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

I think both comments or main print statement are both fine. Thinking out loud -- a nearly LoC-neutral change would be instead of the comments:

if name == "main":
if not os.environ.get('STEAMSHIP_API_KEY'):
print("Please set the STEAMSHIP_API_KEY environment variable. You can get one at ")
exit(-1)

Also we could put a:

Steamship.check_environment(type="replit", exit=True)

helper in?

print("Generating compliments:")

inputs = [
('Dave', 'prompt creation'),
Copy link

Choose a reason for hiding this comment

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

Like this change to the main method

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.

3 participants