Update ai.md
This commit is contained in:
1 parent
8b70744a8e
commit
b6920f7040
1 file changed
+22
@@ -49,6 +49,28 @@ import "ai";
|
|||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
### example
|
||||||
|
```aira
|
||||||
|
import "ai";
|
||||||
|
|
||||||
|
ai.set_key("YOUR_API_KEY");
|
||||||
|
ai.set_provider("PROVIDER","MODEL");
|
||||||
|
|
||||||
|
while true{
|
||||||
|
let user_input = input("Ask to AI : ");
|
||||||
|
|
||||||
|
//EXIT CONTION
|
||||||
|
if user_input == "exit" {
|
||||||
|
say "Goood bye take care";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//ai call
|
||||||
|
let replay = ai.ask(user_input);
|
||||||
|
say "Aira : " + replay;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
### 1. Smart Auto-Routing
|
### 1. Smart Auto-Routing
|
||||||
```aira
|
```aira
|
||||||
import "ai";
|
import "ai";
|
||||||
|
|||||||
Reference in new issue
Block a user