Skip to content

Commit 3611e82

Browse files
committed
Update docs
1 parent 2603ba6 commit 3611e82

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/cookbook/cookbook.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ You can find/setup your API key [here](https://www.aifunction.com/account/api-ke
1717

1818

1919
```python
20-
%env WECO_API_KEY=<YOUR_WECO_API_KEY>
20+
import os
21+
os.environ["WECO_API_KEY"] = "YOUR_WECO_API_KEY"
2122
```
2223

2324
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:
@@ -115,13 +116,11 @@ In the previous examples, we've shown you how to call an AI function with just o
115116
```python
116117
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'.")
117118

118-
119119
task1 = {
120120
"text_input": "I want to train a model to predict house prices using the Boston Housing dataset hosted on Kaggle."
121121
}
122122
task2 = {
123123
"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.",
124-
"images_input": ["https://machinelearningmastery.com/wp-content/uploads/2019/02/Plot-of-a-Subset-of-Images-from-the-MNIST-Dataset-1024x768.png"]
125124
}
126125
responses = task_evaluator.batch([task1, task2])
127126
for response in responses:
@@ -210,7 +209,11 @@ You can now understand why a model generated an output. For this, you'll need to
210209
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'.")
211210

212211
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)
213-
reasoning_steps = response["reasoning_steps"]
214212
for key, value in output.items(): print(f"{key}: {value}")
215213
for i, step in enumerate(metadata["reasoning_steps"]): print(f"Step {i+1}: {step}")
216214
```
215+
216+
217+
```python
218+
219+
```

0 commit comments

Comments
 (0)