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

[docs] 1/n Update getting started Code Snippets #488

Merged
merged 1 commit into from
Dec 15, 2023
Merged

Conversation

Ankush-lastmile
Copy link
Member

@Ankush-lastmile Ankush-lastmile commented Dec 14, 2023

[docs] 1/n Update getting started Code Snippets

Small changes that make it easier to copy paste and run (and have it work)

@Ankush-lastmile Ankush-lastmile changed the title [docs] Update getting started Code Snippets [docs] 1/n Update getting started Code Snippets Dec 14, 2023
@Ankush-lastmile Ankush-lastmile force-pushed the pr488 branch 4 times, most recently from c48b50b to efaa34f Compare December 14, 2023 23:51
@Ankush-lastmile Ankush-lastmile marked this pull request as ready for review December 14, 2023 23:53

# Run a single prompt
await config.run("get_activities")
result = await aiconfig.run("get_activities")
printr(result)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed? Also, should this be print?

Copy link
Member Author

Choose a reason for hiding this comment

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

This code executes silently without a print statement. Nothing gets printed to stdout and the user doesn't see anything. It would make sense for the user to see the output

Yes printr is a typo, thanks for catching

@@ -258,11 +274,10 @@ Let's run this with AIConfig:
Replace `config.run` above with this:

```python
inference_options = InferenceOptions(stream=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we still need this? Or is this set earlier already?

Copy link
Member Author

@Ankush-lastmile Ankush-lastmile Dec 15, 2023

Choose a reason for hiding this comment

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

It is set earlier. Now, User just needs to update the aiconfig.run() call, which uses the previous Inference Options

Small changes that make it easier to copy paste and run (and have it work)
@Ankush-lastmile Ankush-lastmile merged commit 56d1a85 into main Dec 15, 2023
3 checks passed
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