You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cookbook/cookbook.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,8 @@ You can find/setup your API key [here](https://www.aifunction.com/account/api-ke
17
17
18
18
19
19
```python
20
-
%env WECO_API_KEY=<YOUR_WECO_API_KEY>
20
+
import os
21
+
os.environ["WECO_API_KEY"] ="YOUR_WECO_API_KEY"
21
22
```
22
23
23
24
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
115
116
```python
116
117
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'.")
117
118
118
-
119
119
task1 = {
120
120
"text_input": "I want to train a model to predict house prices using the Boston Housing dataset hosted on Kaggle."
121
121
}
122
122
task2 = {
123
123
"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.",
@@ -210,7 +209,11 @@ You can now understand why a model generated an output. For this, you'll need to
210
209
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'.")
211
210
212
211
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"]
214
212
for key, value in output.items(): print(f"{key}: {value}")
215
213
for i, step inenumerate(metadata["reasoning_steps"]): print(f"Step {i+1}: {step}")
0 commit comments