Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): Functions terminology #791

Merged
merged 4 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions pages/apis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,27 @@ import { GuideBox } from "../components/feature-guide-tabs";
<Row>
<GuideBox
content={{
title: "DELTA-V Chat API",
title: "DELTA-V Chat APIs",
description: "Start working with DeltaV chat APIs.",
path: "/apis/ai-engine/chat"
}}
/>

<GuideBox
content={{
title: "DeltaV Functions API",
title: "DeltaV Functions APIs",
description: "Start working with Functions APIs.",
path: "/apis/ai-engine/services"
path: "/apis/ai-engine/functions"
}}
/>

</Row>
<Row>
<GuideBox
content={{
title: "DELTA-V Function Groups APIs",
description: "Explore DeltaV Function Groups APIs.",
path: "/apis/ai-engine/function_groups"
}}
/>

Expand Down
3 changes: 2 additions & 1 deletion pages/apis/ai-engine/function_groups.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
# DeltaV Function Groups API

<div className="nx-text-fetch-content">
Most of the endpoints depends on various instances and are considered parameters for the actual endpoint, but these are not meant to be passed directly by the user.

Most of the endpoints depends on various instances and are considered parameters for the actual endpoint, but these are not meant to be passed directly by the user.

Instead, these instance-dependent elements are integrated and managed directly by the backend system. We refer to them as `*name_parameter`, where the asterisk (\*) is used to denote a specific instance-dependent parameter that the route relies on.

Expand Down
4 changes: 2 additions & 2 deletions pages/concepts/introducing-fetchai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The **Agentverse** is a Software as a Service (SaaS) platform built primarily fo

The Agentverse provides multiple use cases ranging from simple "Hello World" to AI-driven recommendation systems. These use cases are only a click away from being edited, tweaked, and deployed for yourself.

You can post your agent(s) as a function on Agentverse so that the AI Engine can quickly find them and promote them to other users or agents via DeltaV.
You can post your agent(s) and their functions on Agentverse so that the AI Engine can quickly find them and promote them to other users or agents via DeltaV.

### DeltaV and the AI Engine: enabling user interactions

Expand All @@ -44,7 +44,7 @@ The **Fetch Name Service** works as a decentralized naming system which simplifi

The backbone of Fetch.ai decentralized infrastructure is represented by the **Fetch ledger**. It acts as a secure and immutable record-keeping system and provides a transparent record of transactions, fostering trust and reliability across the network. The Fetch ledger supports the decentralized economy, ensuring secure data sharing and transactional integrity.

The overall system we depicted runs on a specific fuel: **FET tokens**. These tokens hold intrinsic value and utility, drive transactions, promote active participation, and empower various decentralized services within the Fetch network. FET serves as a medium of exchange and facilitates interactions among users, Agents, and services within the Fetch ecosystem.
The overall system we depicted runs on a specific fuel: **FET tokens**. These tokens hold intrinsic value and utility, drive transactions, promote active participation, and empower various decentralized services within the Fetch network. FET serves as a medium of exchange and facilitates interactions among users, Agents, and Functions within the Fetch ecosystem.

### Next steps

Expand Down
56 changes: 28 additions & 28 deletions pages/guides/apis/agent-function-creation-apis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,22 @@ This script interacts with the Agentverse API to achieve the Agent and Function
})
model = response_model.json()['models']

time.sleep(10) # Waiting before storing details to create services
time.sleep(10) # Waiting before storing details to create functions
```

6. Now, save all the required details to create the Agent Function. Then, create the Agent Function on the basis of the details received:

```python
# Taking inputs from user for details required to create a function
name_service = input("Please give function name: ")
name_function = input("Please give function name: ")
description = input("Please enter function description: ")
field_name = input("Please enter field name: ")
field_description = input("Please enter field description: ")
tasktype = input("Please tell primary or secondary function: ").upper()

# Logging details provided by user
print(
f"Service name: {name_service} \nFunction Description: {description} \nField Name: {field_name}\nField Description: {field_description}\nTask Type: {tasktype}"
f"Function name: {name_function} \nFunction Description: {description} \nField Name: {field_name}\nField Description: {field_description}\nTask Type: {tasktype}"
)

# Storing model digest and name to be used for function creation
Expand All @@ -170,7 +170,7 @@ This script interacts with the Agentverse API to achieve the Agent and Function
# Creating payload for function creation
data = {
"agent": address,
"name": name_service,
"name": name_function,
"description": description,
"protocolDigest": protocol_digest,
"modelDigest": model_digest,
Expand Down Expand Up @@ -242,18 +242,18 @@ time.sleep(10) # Waiting before getting model_digest
# Request to get agent's model details
response_model = requests.get(f"https://agentverse.ai/v1/almanac/manifests/protocols/{protocol_digest}", headers={"Authorization": token})
model = response_model.json()['models']
time.sleep(10) # Waiting before storing details to create services
time.sleep(10) # Waiting before storing details to create functions

# Taking inputs from user for details required to create a function
name_service = input("Please give function name: ")
name_function = input("Please give function name: ")
description = input("Please enter function description: ")
field_name = input("Please enter field name: ")
field_description = input("Please enter field description: ")
tasktype = input("Please tell primary or secondary function: ").upper()

# Logging details provided by user
print(
f"Service name: {name_service} \nFunction Description: {description} \nField Name: {field_name}\nField Description: {field_description}\nTask Type: {tasktype}"
f"Function name: {name_function} \nFunction Description: {description} \nField Name: {field_name}\nField Description: {field_description}\nTask Type: {tasktype}"
)

# Storing model digest and name to be used for function creation
Expand All @@ -265,7 +265,7 @@ print(f"Model Name : {model_name}")
# Creating payload for function creation
data = {
"agent": address,
"name": name_service,
"name": name_function,
"description": description,
"protocolDigest": protocol_digest,
"modelDigest": model_digest,
Expand Down Expand Up @@ -299,31 +299,31 @@ print(f"Function Created with name: {name}")
3. Head over to the [Agentverse ↗️](https://agentverse.ai/profile/api-keys) and [generate API keys ↗️](#how-to-get-agentverse-api-tokens).
4. Open script in editor and replace `token` field.
5. Run command `python agent_create.py` and enter the required details.
6. Provide Agent and Function Details as asked, then, check agent and function on Agentverse.
6. Provide Agent and Function details as asked, then, check agent and function on Agentverse.

## Expected Output

- Provide all details asked in the script:

```
abc@xyz-MacBook-Pro agents % python3 agents_create.py
Please give name of your agent? my first API agent
Agent Address : agent1q06l8hekn859e5rtwufewmyhwghe6j9y00g0wc8u7gcx05cjfk98jyf6lte
Protocol Digest : c7a6f160fd8d8b7cb357dad9b5be420510ce466dbb67051c07caf2b860216b01
Please give function name: location finder
Please enter function description: this function helps to find nearest city using coordinates
Please enter field name: location
Please enter field description: this describes the coordinates of the location in string format longitude latitude
Please tell primary or secondary function: primary
Service name: location finder
Function Description: this function helps to find nearest city using coordinates
Field Name: location
Field Description: this describes the coordinates of the location in string format longitude latitude
Task Type: PRIMARY
Model Digest : 10a2f843c4c92955688d5e7f22fabe79623869eabfcd97d97da83527b436d3e2
Model Name : Coordinates
Function Created with name: location finder
```
```
abc@xyz-MacBook-Pro agents % python3 agents_create.py
Please give name of your agent? my first API agent
Agent Address : agent1q06l8hekn859e5rtwufewmyhwghe6j9y00g0wc8u7gcx05cjfk98jyf6lte
Protocol Digest : c7a6f160fd8d8b7cb357dad9b5be420510ce466dbb67051c07caf2b860216b01
Please give function name: location finder
Please enter function description: this function helps to find nearest city using coordinates
Please enter field name: location
Please enter field description: this describes the coordinates of the location in string format longitude latitude
Please tell primary or secondary function: primary
Function name: location finder
Function Description: this function helps to find nearest city using coordinates
Field Name: location
Field Description: this describes the coordinates of the location in string format longitude latitude
Task Type: PRIMARY
Model Digest : 10a2f843c4c92955688d5e7f22fabe79623869eabfcd97d97da83527b436d3e2
Model Name : Coordinates
Function Created with name: location finder
```

- Agent created on Agentverse:

Expand Down
Loading