Skip to content

proposed changes to replit template#1

Open
steamship-developers wants to merge 1 commit intomainfrom
testing-new-format
Open

proposed changes to replit template#1
steamship-developers wants to merge 1 commit intomainfrom
testing-new-format

Conversation

@steamship-developers
Copy link
Copy Markdown
Contributor

DO NOT COMMIT.

Only for review / collaboration purposes.

Copy link
Copy Markdown

@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!

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

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

Comment thread api.py


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

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?

Comment thread api.py
print("Generating compliments:")

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

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.

2 participants