Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DhruvSrikanth committed Nov 25, 2024
1 parent 2603ba6 commit 3611e82
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/cookbook/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ You can find/setup your API key [here](https://www.aifunction.com/account/api-ke


```python
%env WECO_API_KEY=<YOUR_WECO_API_KEY>
import os
os.environ["WECO_API_KEY"] = "YOUR_WECO_API_KEY"
```

You can build powerful AI functions for complex tasks quickly and without friction. For example, you can create an AI function on our [platform](https://www.aifunction.com/function/new) with a simple description as shown below:
Expand Down Expand Up @@ -115,13 +116,11 @@ In the previous examples, we've shown you how to call an AI function with just o
```python
task_evaluator = build(task_description="I want to know if AI can solve a problem for me, how easy it is to arrive at a solution and whether any helpful tips for me along the way. Help me understand this through - 'feasibility', 'justification', and 'suggestions'.")


task1 = {
"text_input": "I want to train a model to predict house prices using the Boston Housing dataset hosted on Kaggle."
}
task2 = {
"text_input": "I want to train a model to classify digits using the MNIST dataset hosted on Kaggle using a Google Colab notebook. Attached is an example of what some of the digits would look like.",
"images_input": ["https://machinelearningmastery.com/wp-content/uploads/2019/02/Plot-of-a-Subset-of-Images-from-the-MNIST-Dataset-1024x768.png"]
}
responses = task_evaluator.batch([task1, task2])
for response in responses:
Expand Down Expand Up @@ -210,7 +209,11 @@ You can now understand why a model generated an output. For this, you'll need to
task_evaluator = build(task_description="I want to know if AI can solve a problem for me, how easy it is to arrive at a solution and whether any helpful tips for me along the way. Help me understand this through - 'feasibility', 'justification', and 'suggestions'.")

output, metadata = task_evaluator("I want to train a model to predict house prices using the Boston Housing dataset hosted on Kaggle.", return_reasoning=True)
reasoning_steps = response["reasoning_steps"]
for key, value in output.items(): print(f"{key}: {value}")
for i, step in enumerate(metadata["reasoning_steps"]): print(f"Step {i+1}: {step}")
```


```python

```

0 comments on commit 3611e82

Please sign in to comment.