diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..469d304b1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contribution Guidelines + +This Documentation cannot be built without your skills and knowledge. + +- [Question or Problem?](#question) +- [Issues and Bugs](#issue) +- [Feature Requests](#feature) +- [Submission Guidelines](#submit) + +## Question or Problem? + +Ideally reach out to us on the dev-advocacy-slack channel. + +## Found a Bug? Or something missing? + +If there is something not right, whether it be the code, grammar or worse a broken link open up an issue and we'll allocate time to fix in upcomming sprints. You of course can also [submit a Pull Request](#submit-pr) with a fix. + +## Missing a Feature? + +You can _request_ a new feature by creating a feature request issue. + +## Updating Docs: + +Please create a branch from master, update or add files into the directory you think they're best placed. Open a PR, and someone from the docs team will review. diff --git a/pages/guides/fetch-network/getting-tokens.mdx b/pages/guides/fetch-network/getting-tokens.mdx new file mode 100644 index 000000000..a26e08bbf --- /dev/null +++ b/pages/guides/fetch-network/getting-tokens.mdx @@ -0,0 +1,52 @@ +# Token Faucet + +For our test networks, we have a simple token faucet implemented to allow users of the network to get started quickly. You can send it an account address, and it will transfer some test token on it. + +Token Faucets are network specific, depending on the network type they may or may not be deployed. Please check the [networks](../live-networks/) page for specific details. + +The Token Faucet itself is available from the network block explorer (`GET FUNDS` button on the homepage). + +Enter your `fetch...` address in the popup and click *Add funds* button. Wait a few blocks for the transaction to be processed, and you should see it appear along with some funds on your account. + +## Add funds to Wallet using faucet APIs: + +You can also request and get testnet tokens in your wallet using the APIs. + +### Get some atestfet + +```bash +curl -X POST -H 'Content-Type: application/json' -d '{"address":"
"}' https://faucet-dorado.fetch.ai/api/v3/claims +``` + +### Get some nanomobx + +```bash +curl -X POST -H 'Content-Type: application/json' -d '{"address":"
"}' https://faucet-mobx-dorado.fetch.ai/api/v3/claims +``` + +### Get some ulrn + +```bash +curl -X POST -H 'Content-Type: application/json' -d '{"address":"
"}' https://faucet-lrn-dorado.fetch.ai/api/v3/claims +``` + +### Sample response for fund request to faucet + +```text +{"status":"ok","uuid":"","target":"
"} +``` + +### Check the wallet balance + +```bash +fetchd query bank balances
+``` + +```text +balances: +- amount: "" + denom: atestfet +pagination: + next_key: null + total: "0" +``` \ No newline at end of file diff --git a/pages/guides/integrations/fetch-holiday/getting-started.mdx b/pages/guides/integrations/fetch-holiday/getting-started.mdx index 56db112be..9a40029a2 100644 --- a/pages/guides/integrations/fetch-holiday/getting-started.mdx +++ b/pages/guides/integrations/fetch-holiday/getting-started.mdx @@ -1,3 +1,12 @@ +# μAgents Holiday Integrations ✈️ + +## Introduction + +The μAgents Holiday Integrations example demonstrates how to integrate and coordinate multiple agents to provide information and support in the handling and booking of flights, travels, and activities so to assist you in organizing your perfect holiday in a matter of few minutes. + +The example showcases how different agents can work together and how these interact with various APIs to gather and process data to help you in booking the perfect holiday according to your needs and wishes! + + # Getting started 🎯 ## Prerequisites @@ -8,9 +17,11 @@ Before starting, you will need the following: - [Poetry ↗️](https://python-poetry.org/). - [μAgents framework ↗️](/guides/agents/installing-uagent). +steps for setting up python and installing poetry, and uagents framework can be found here + ## Set up the project and virtual environment -First of all, create a `fetch-holiday` folder for your project files: `mkdir fetch-holiday`. Then, create another `src` sub-folder within it for your scripts: `mkdir src`. +Using a terminal navigate to a directory where you're happy to work within then create a `fetch-holiday` folder for your project files: `mkdir fetch-holiday`. Then, create another `src` sub-folder within it for your scripts: `mkdir src`. To run the example, you will need **API keys** from: @@ -32,7 +43,11 @@ To run the example, you will need **API keys** from: - Visit [SerpAPI ↗️](https://serpapi.com/) and sign up or log in. - Your API key will be available on the dashboard. -Once you have all three keys, create a `.env` file within the `src` folder in your project, including the following: +Once you have all three keys, create a `.env` file within the `src` folder in your project: + +`touch src/.env` + +Update to including the following: ``` export RAPIDAPI_API_KEY="{GET THE API KEY}" diff --git a/pages/guides/integrations/fetch-holiday/intro.mdx b/pages/guides/integrations/fetch-holiday/intro.mdx deleted file mode 100644 index 222b56c25..000000000 --- a/pages/guides/integrations/fetch-holiday/intro.mdx +++ /dev/null @@ -1,7 +0,0 @@ -# Fetch holiday integrations ✈️ - -## Introduction - -The μAgents Holiday Integrations example demonstrates how to integrate and coordinate multiple agents to provide information and support in the handling and booking of flights, travels, and activities so to assist you in organizing your perfect holiday in a matter of few minutes. - -The example showcases how different agents can work together and how these interact with various APIs to gather and process data to help you in booking the perfect holiday according to your needs and wishes! diff --git a/pages/guides/integrations/fetch-holiday/walk-through.mdx b/pages/guides/integrations/fetch-holiday/walk-through.mdx index c44bd4ef3..3eff684a1 100644 --- a/pages/guides/integrations/fetch-holiday/walk-through.mdx +++ b/pages/guides/integrations/fetch-holiday/walk-through.mdx @@ -34,7 +34,7 @@ Let's start by defining the script for a top activities agent which provides tou 1. Enter the `activities` folder and create a script for this agent: `touch top_activities.py` -2. Within this script, import the necessary modules, create an agent `top_activities` using a secret `seed`, and make sure it has enough funds to register in the [Almanac contract ↗](/references/contracts/uagents-almanac/almanac-overview.mdx): +2. Paste in the following snippet: ```py copy from langchain.chat_models import ChatOpenAI @@ -57,7 +57,10 @@ Let's start by defining the script for a top activities agent which provides tou fund_agent_if_low(agent.wallet.address()) ``` -3. Let's then define an **output parser** using `CommaSeparatedListOutputParser`, to help parse the results from the agent's response, and a **prompt template** defined using a `PromptTemplate` instance, which provides a structured message that explains the agent's role and expectations. It includes placeholders for variables like `city`, `date`, and `preferred_activities_str`: +We've just imported all the necessary modules, created an agent named `top_activities` using a secret [seed ↗](https://en.wikipedia.org/wiki/Random_seed) , and with ` fund_agent_if_low(agent.wallet.address())` made sure that this agent has enough funds to register in the [Almanac contract ↗](/references/contracts/uagents-almanac/almanac-overview.mdx): + + +3. Next let's then define an **output parser** using `CommaSeparatedListOutputParser` from the Langchain library we just imported. This helps parse the results from the agent's response. Then we define a **prompt template** by using a `PromptTemplate` instance, which provides a structured message that explains the agent's role and expectations. It includes placeholders for variables like `city`, `date`, and `preferred_activities_str`: ```py copy output_parser = CommaSeparatedListOutputParser() @@ -74,7 +77,7 @@ Let's start by defining the script for a top activities agent which provides tou ) ``` -4. Let's create an instance of the `ChatOpenAI` class (referred to as `llm`) to interact with a large language model to understand and generate human-like text. The next steps would be loading tools for the agent and initialize it by also connecting the loaded tools and the large language model to it. Finally, define the communication protocol, called `TopActivities`: +4. Now let's create an instance of the `ChatOpenAI` class (referred to as `llm`) to interact with a large language model to understand and generate human-like text. The next steps would be loading tools for the agent and initialize it by also connecting the loaded tools and the large language model to it. Finally, define the communication protocol, called `TopActivities`: ```py copy llm = ChatOpenAI(temperature=0.1)