Ability functions
calculator_function(question)
Runs a natural language math query using the LLMMathChain.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
question |
str
|
The natural language math query. |
required |
Returns:
Name | Type | Description |
---|---|---|
str | The response to the query. |
Examples:
>>> calculator_function("What is the square root of 25?")
5
Source code in backend/Multi-Sensory Virtual AAGI/ability_functions/calculator.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
search_function(question)
Searches for information on a given question.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
question |
str
|
The question to search for. |
required |
Returns:
Name | Type | Description |
---|---|---|
str | Output of the search. |
Examples:
>>> search_function("What is the capital of France?")
"Searching for information on this What is the capital of France?
Paris"
Source code in backend/Multi-Sensory Virtual AAGI/ability_functions/search.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
natural_language_task_function(instructions)
Generates a response to a given instruction using OpenAI's GPT-3.5-Turbo model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instructions |
str
|
The instruction to generate a response to. |
required |
Returns:
Name | Type | Description |
---|---|---|
str | The response generated by the GPT-3.5-Turbo model. |
Examples:
>>> natural_language_task_function("What is the weather like today?")
"It's sunny and warm today."
Source code in backend/Multi-Sensory Virtual AAGI/ability_functions/natural_language_task.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
wikipedia_function(topic)
Runs a query on the Wikipedia API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
topic |
str
|
The topic to query. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict | The result of the query. |
Examples:
>>> wikipedia_function('Python')
{'title': 'Python', 'summary': 'Python is a programming language...'}
Source code in backend/Multi-Sensory Virtual AAGI/ability_functions/wikipedia.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|