Skip to content

Commit

Permalink
[DOCS] Fix Python Getting Started
Browse files Browse the repository at this point in the history
Fixes:
- removed `You can also use AIConfigRuntime.loadJSON({})` for python. Its possible to load Json but not with that syntax
- Step 2, specify options=
- Step 3, specify options=
- Step 4: correct `run_with_dependencies`
  • Loading branch information
Ankush Pala [email protected] committed Nov 10, 2023
1 parent b6cd0ef commit db16f15
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions aiconfig-docs/docs/introduction/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async function travelWithGPT() {
```python title="app.py"
from aiconfig import AIConfigRuntime, InferenceOptions

# Load the aiconfig. You can also use AIConfigRuntime.loadJSON({})
# Load the aiconfig.
config = AIConfigRuntime.load('travel.aiconfig.json')

# Run a single prompt
Expand Down Expand Up @@ -191,7 +191,7 @@ config = AIConfigRuntime.load('travel.aiconfig.json')

# Run a single prompt (with streaming)
inference_options = InferenceOptions(stream=True)
await config.run("get_activities", params=None, inference_options)
await config.run("get_activities", params=None, options=inference_options)
```

</TabItem>
Expand Down Expand Up @@ -255,10 +255,11 @@ Replace `config.run` above with this:

```python
inference_options = InferenceOptions(stream=True)
await config.run_with_dependencies(
await config.run(
"gen_itinerary",
params={"order_by": "duration"},
inference_options)
options=inference_options,
run_with_dependencies=True)
```

</TabItem>
Expand All @@ -284,7 +285,7 @@ aiConfig.save(

```python
# Save the aiconfig to disk. and serialize outputs from the model run
config.save('updated.aiconfig.json', include_output=True)
config.save('updated.aiconfig.json', include_outputs=True)
```

</TabItem>
Expand Down

0 comments on commit db16f15

Please sign in to comment.