Skip to content

Commit

Permalink
use gaia.doamins
Browse files Browse the repository at this point in the history
  • Loading branch information
alabulei1 committed Feb 25, 2025
1 parent c64418c commit cab4bdf
Show file tree
Hide file tree
Showing 35 changed files with 115 additions and 88 deletions.
4 changes: 2 additions & 2 deletions docs/agent-integrations/codegpt.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In this tutorial, we will use the public CodeStral nodes to power the CodeGPT pl

| Model type | API base URL | Model name |
|-----|--------|-----|
| Chat | https://codestral.us.gaianet.network/v1/v1/ | codestral |
| Chat | https://coder.gaia.domains/v1/v1/ | codestral |


> For some reason, CodeGPT requires the API endpoint to include an extra `v1/` at the end.
Expand All @@ -42,7 +42,7 @@ Click the CODEGPT on the right sidebar and enter the settings page for CodeGPT.

| Attribute | Value |
|-----|--------|
| API endpoint URL | https://codestral.us.gaianet.network/v1/v1/ |
| API endpoint URL | https://coder.gaia.domains/v1/v1/ |
| API Key | gaia |

![](codegpt-03.png)
Expand Down
4 changes: 2 additions & 2 deletions docs/agent-integrations/continue.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ In this tutorial, we will use public nodes to power the Continue plugin.
|-----|--------|-----|
| Chat | https://llama8b.gaia.domains/v1/ | llama |
| Embedding | https://llama8b.gaia.domains/v1/ | nomic |
| Autocompletion | https://codestral.us.gaianet.network/v1/ | codestral |
| Autocompletion | https://coder.gaia.domains./v1/ | codestral |

> It is important to note that Continue requires the API endpoint to include a `/` at the end.
Expand Down Expand Up @@ -55,7 +55,7 @@ chat, code autocomplete and embeddings.
],
"tabAutocompleteModel": {
"title": "Autocomplete",
"apiBase": "https://codestral.us.gaianet.network/v1/",
"apiBase": "https://coder.gaia.domains/v1/",
"model": "codestral",
"provider": "openai"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/agent-integrations/flowiseai-tool-call.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Step 2: On the **Chatflow** canvas, add a node called **ChatLocalAI**.

Step 3: Configure the **ChatLocalAI** widget to use the Gaia node with tool call support you have created.

* Base path: `https://YOUR-NODE-ID.us.gaianet.network/v1`
* Base path: `https://YOUR-NODE-ID.gaia.domains/v1`
* Model name: e.g., `Mistral-7B-Instruct-v0.3.Q5_K_M`

Step 4: Add a node called **Custom Tool**
Expand Down
8 changes: 4 additions & 4 deletions docs/agent-integrations/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ Remember to append the `/v1` after the host name. You can find a list of public
```
import openai
client = openai.OpenAI(base_url="https://YOUR-NODE-ID.us.gaianet.network/v1", api_key="YOUR_API_KEY_GOES_HERE")
client = openai.OpenAI(base_url="https://YOUR-NODE-ID.gaia.domains/v1", api_key="YOUR_API_KEY_GOES_HERE")
```

Alternatively, you could set an environment variables at the OS level.

```
export OPENAI_API_BASE=https://YOUR-NODE-ID.us.gaianet.network/v1
export OPENAI_API_BASE=https://YOUR-NODE-ID.gaia.domains/v1
export OPENAI_API_KEY=YOUR_API_KEY_GOES_HERE
```

Expand Down Expand Up @@ -79,14 +79,14 @@ Create an OpenAI client with a custom base URL. Remember to append the `/v1` aft

```js
const client = new OpenAI({
baseURL: 'https://YOUR-NODE-ID.us.gaianet.network/v1',
baseURL: 'https://YOUR-NODE-ID.gaia.domains/v1',
apiKey: 'YOUR_API_KEY_GOES_HERE'
});
```

Alternatively, you can set an environment variable using `dotenv` in Node.
```
process.env.OPENAI_API_BASE = 'https://YOUR-NODE-ID.us.gaianet.network/v1';
process.env.OPENAI_API_BASE = 'https://YOUR-NODE-ID.gaia.domains/v1';
```

Then, when you make API calls from the `client`, make sure that the `model` is set to the model name
Expand Down
2 changes: 1 addition & 1 deletion docs/agent-integrations/llamaedgebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export OPENAI_API_KEY="GAIANET"
**Hint:** if you don't know the model name of the Gaia node, you can retrieve the model information using:

```
curl -X POST https://0x57b00e4f3d040e28dc8aabdbe201212e5fb60ebc.us.gaianet.network/v1/models
curl -X POST https://0x57b00e4f3d040e28dc8aabdbe201212e5fb60ebc.gaia.domains/v1/models
```

Then, use the following command line to run the app.
Expand Down
2 changes: 1 addition & 1 deletion docs/agent-integrations/stockbot.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In this tutorial, we will use a public Llama3 node with the function call suppor

| Attribute | Value |
|-----|--------|
| API endpoint URL | https://llamatool.us.gaianet.network/v1 |
| API endpoint URL | https://llama8b.gaia.domains/v1 |
| Model Name | llama |
| API KEY | gaia |

Expand Down
10 changes: 5 additions & 5 deletions docs/agent-integrations/translation-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ You can run the Translation Agent on top of a public Gaia Node as a backend and

## Prepare the environment

Here, we will use the public Gaia node with gemma-2-27b model. `https://gemma.us.gaianet.network/`.
Here, we will use the public Gaia node with Llama 3.1 8b model. `https://llama8b.gaia.domains/`.


>As an alternative, you can also start a Gaia node locally on your device. Refer to [this guide](https://github.com/GaiaNet-AI/node-configs/tree/main/gemma-2-27b-it).
>As an alternative, you can also start a Gaia node locally on your device. Refer to [this guide](https://github.com/GaiaNet-AI/node-configs/tree/main/llama-3.1-8b-instruct).

To get started, clone the Translation Agent that supports open source LLMs.
Expand All @@ -28,12 +28,12 @@ cd translation-agent
git checkout use_llamaedge
```

Set environment variables and install necessary Python packages if needed. Replace the OPENAI_BASE_URL with `https://gemma.us.gaianet.network/`
Set environment variables and install necessary Python packages if needed. Replace the OPENAI_BASE_URL with `https://llama8b.gaia.domains/`

```
export OPENAI_BASE_URL="https://gemma.us.gaianet.network/v1"
export OPENAI_BASE_URL="https://llama8b.gaia.domains/v1"
export PYTHONPATH=${PWD}/src
export OPENAI_API_KEY="GAIANET"
export OPENAI_API_KEY="GET YOUR OWN API KEY"
pip install python-dotenv
pip install openai tiktoken icecream langchain_text_splitters
Expand Down
14 changes: 7 additions & 7 deletions docs/getting-started/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sidebar_position: 10
Each Gaia node is an OpenAI compatible API server. You can build your application based on the Gaia node API. You
can also replace OpenAI API configuration with the Gaia node API in other AI agent frameworks.

The base URL to send all API requests is `https://node_id.gaianet.network/v1`.
The base URL to send all API requests is `https://node_id.gaia.domains/v1`.

:::note

Expand All @@ -30,7 +30,7 @@ By default, the API responds with a full answer in the HTTP response.
**Request**

```
curl -X POST https://node_id.gaianet.network/v1/chat/completions \
curl -X POST https://node_id.gaia.domains/v1/chat/completions \
-H 'accept:application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY_GOES_HERE' \
Expand All @@ -50,7 +50,7 @@ Add `"stream":true` in your request to make the API send back partial responses
**Request:**

```
curl -X POST https://node_id.gaianet.network/v1/chat/completions \
curl -X POST https://node_id.gaia.domains/v1/chat/completions \
-H 'accept:application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY_GOES_HERE' \
Expand Down Expand Up @@ -107,7 +107,7 @@ The `embeddings` endpoint computes embeddings for user queries or file chunks.
**Request**

```
curl -X POST https://node_id.gaianet.network/v1/embeddings \
curl -X POST https://node_id.gaia.domains/v1/embeddings \
-H 'accept:application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY_GOES_HERE' \
Expand Down Expand Up @@ -167,7 +167,7 @@ The `retrieve` endpoint can retrieve text from the node's vector collection base
**Request:**

```
curl -X POST https://node_id.gaianet.network/v1/retrieve \
curl -X POST https://node_id.gaia.domains/v1/retrieve \
-H 'accept:application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY_GOES_HERE' \
Expand Down Expand Up @@ -212,7 +212,7 @@ The `models` endpoint provides the chat and embedding models available on the no
**Request:**

```
curl -X POST https://node_id.gaianet.network/v1/models
curl -X POST https://node_id.gaia.domains/v1/models
```

**Response:**
Expand All @@ -228,7 +228,7 @@ The `info` endpoint provides detailed information about the node.
**Request:**

```
curl -X POST https://node_id.gaianet.network/v1/info
curl -X POST https://node_id.gaia.domains/v1/info
```

**Response:**
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/mynode.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ web-based chatbot UI and an OpenAI compatible web service. Just load the node's
Let's say the URL is as follows.

```
https://0x1234...xyz.gaianet.network/
https://0x1234...xyz.gaia.domains/
```

> Please refer to the [agent apps](../agent-integrations/intro) section to see how to use the Gaia node API in your favorite agent frameworks or apps.
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorial/coinbase.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ export CDP_API_KEY_PRIVATE_KEY='-----BEGIN EC...END EC PRIVATE KEY-----\n'
Edit the `chatbot.py` file to configure the agent to use the Gaia node above.

```
llm = ChatOpenAI(model="llama", api_key="GAIA", base_url="https://llamatool.us.gaianet.network/v1")
llm = ChatOpenAI(model="llama", api_key="GAIA", base_url="https://llama8b.gaia.domains/v1")
```
> You will need to get an API key from Gaia.
Finally, run the agent using Python.

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ On a Gaia node, we will get a database snapshot with the embeddings to use at la

## Lifecycle of a user query on a knowledge-supplemented LLM

Next, let's learn the lifecycle of a user query on a knowledge-supplemented LLM. We will take [a Gaia Node with Gaia knowledge](https://knowledge.gaianet.network/chatbot-ui/index.html) as an example.
Next, let's learn the lifecycle of a user query on a knowledge-supplemented LLM. We will take [a Gaia Node with Gaia knowledge](https://gaia.gaia.domains/chatbot-ui/index.html) as an example.

![user-query-rag](https://github.com/GaiaNet-AI/docs/assets/45785633/c64b85ea-65f0-43d2-8ab3-78889d21c248)

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/tool-call.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Set the environment variables for the API server and model name we just set up.

```
export OPENAI_MODEL_NAME="llama"
export OPENAI_BASE_URL= "https://llamatool.us.gaianet.network/v1"
export OPENAI_BASE_URL= "https://llama8b.gaia.domains/v1"
```

Run the `main.py` application and bring up the command line chat interface.
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorial/translator-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Next, we will install a local Gaia node, which provides the backend API services
curl -sSfL 'https://github.com/GaiaNet-AI/gaianet-node/releases/latest/download/install.sh' | bash
```

You will also need the following configurations and prerequisites to run the agent app. If you are using a public Gaia node instead of your local node, replace the `http://localhost:8080` with `https://node_id.us.gaianet.network`.
You will also need the following configurations and prerequisites to run the agent app. If you are using a Gaia node instead of your local node, replace the `http://localhost:8080` with `https://node_id.gaia.domains`.

```
export OPENAI_BASE_URL="http://localhost:8080/v1"
Expand All @@ -39,6 +39,7 @@ export OPENAI_API_KEY="GAIANET"
pip install python-dotenv
pip install openai tiktoken icecream langchain_text_splitters
```
> If you're using a Domain service, you will [need to get an API key from Gaia](../getting-started/authentication.md).
## Demo 1: Running Translation Agents with Llama-3-8B

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ On a Gaia node, we will get a database snapshot with the embeddings to use at la

## Lifecycle of a user query on a knowledge-supplemented LLM

Next, let's learn the lifecycle of a user query on a knowledge-supplemented LLM. We will take [a Gaia Node with Gaia knowledge](https://knowledge.gaianet.network/chatbot-ui/index.html) as an example.
Next, let's learn the lifecycle of a user query on a knowledge-supplemented LLM. We will take [a Gaia Node with Gaia knowledge](https://gaia.gaia.domains/chatbot-ui/index.html) as an example.

![user-query-rag](https://github.com/GaiaNet-AI/docs/assets/45785633/c64b85ea-65f0-43d2-8ab3-78889d21c248)

Expand Down
8 changes: 6 additions & 2 deletions versioned_docs/version-1.0.0/tutorial/coinbase.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Or, you could simply use our public node.

| Attribute | Value |
|-----|--------|
| API endpoint URL | https://llamatool.us.gaianet.network/v1 |
| API endpoint URL | https://llama8b.gaia.domains/v1 |
| Model Name | llama |
| API KEY | gaia |

> If you're using a Domain service, not your own node, you will [need to get an API key from Gaia](../getting-started/authentication.md).
## Quickstart

First, you need a [Coinbase Developer Platform account](https://www.coinbase.com/developer-platform) and then [create an API key](https://docs.cdp.coinbase.com/advanced-trade/docs/auth/#creating-api-keys).
Expand All @@ -35,9 +37,11 @@ export CDP_API_KEY_PRIVATE_KEY='-----BEGIN EC...END EC PRIVATE KEY-----\n'
Edit the `chatbot.py` file to configure the agent to use the Gaia node above.

```
llm = ChatOpenAI(model="llama", api_key="GAIA", base_url="https://llamatool.us.gaianet.network/v1")
llm = ChatOpenAI(model="llama", api_key="GAIA", base_url="https://llama8b.gaia.domains/v1")
```

> If you're using a Domain service, not your own node, you will [need to get an API key from Gaia](../getting-started/authentication.md).
Finally, run the agent using Python.

```
Expand Down
9 changes: 6 additions & 3 deletions versioned_docs/version-1.0.0/tutorial/tool-call.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ You will need a Gaia node ready to provide LLM services through a public URL. Yo
* [run your own node](../node-guide/quick-start.md). You will need to start a Gaia node for the [Llama-3-Groq model](https://github.com/GaiaNet-AI/node-configs/tree/main/llama-3-groq-8b-tool) or the [Mistral-7B-v0.3 Instruct model](https://github.com/GaiaNet-AI/node-configs/tree/main/mistral-0.3-7b-instruct-tool-call) . You can then use the node's API URL endpoint and model name in your tool call apps.
* [use a public node](../user-guide/nodes.md)

In this tutorial, we will use a public Llama3 node with the function call support.
In this tutorial, we will use a public Llama3 domain with the function call support.

| Attribute | Value |
|-----|--------|
| API endpoint URL | https://llamatool.us.gaianet.network/v1 |
| API endpoint URL | https://llama8b.gaia.domains/v1 |
| Model Name | llama |
| API KEY | gaia |

> If you're using a Domain service, not your own node, you will [need to get an API key from Gaia](../getting-started/authentication.md).
## Run the demo agent

Expand All @@ -44,8 +45,10 @@ Set the environment variables for the API server and model name we just set up.

```
export OPENAI_MODEL_NAME="llama"
export OPENAI_BASE_URL= "https://llamatool.us.gaianet.network/v1"
export OPENAI_BASE_URL= "https://llama8b.gaia.domains/v1"
export OPENAI_API_KEY="GAIANET"
```
> If you're using a Domain service, not your own node, you will [need to get an API key from Gaia](../getting-started/authentication.md).
Run the `main.py` application and bring up the command line chat interface.

Expand Down
3 changes: 2 additions & 1 deletion versioned_docs/version-1.0.0/tutorial/translator-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Next, we will install a local GaiaNet node, which provides the backend API servi
curl -sSfL 'https://github.com/GaiaNet-AI/gaianet-node/releases/latest/download/install.sh' | bash
```

You will also need the following configurations and prerequisites to run the agent app. If you are using a public GaiaNet node instead of your local node, replace the `http://localhost:8080` with `https://node_id.us.gaianet.network`.
You will also need the following configurations and prerequisites to run the agent app. If you are using a public GaiaNet node instead of your local node, replace the `http://localhost:8080` with `https://node_id.gaia.domains`.

```
export OPENAI_BASE_URL="http://localhost:8080/v1"
Expand All @@ -39,6 +39,7 @@ export OPENAI_API_KEY="GAIANET"
pip install python-dotenv
pip install openai tiktoken icecream langchain_text_splitters
```
> If you're using a Domain service, not your own node, you will [need to get an API key from Gaia](../getting-started/authentication.md).
## Demo 1: Running Translation Agents with Llama-3-8B

Expand Down
14 changes: 7 additions & 7 deletions versioned_docs/version-1.0.0/user-guide/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sidebar_position: 4
Each GaiaNet node is an OpenAI compatible API server. You can build your application based on the GaiaNet node API. You
can also replace OpenAI API configuration with the GaiaNet node API in other AI agent frameworks.

The base URL to send all API requests is `https://node_id.gaianet.network/v1`.
The base URL to send all API requests is `https://node_id.gaia.domains/v1`.

## Endpoints

Expand All @@ -24,7 +24,7 @@ By default, the API responds with a full answer in the HTTP response.
**Request**

```
curl -X POST https://node_id.gaianet.network/v1/chat/completions \
curl -X POST https://node_id.gaia.domains/v1/chat/completions \
-H 'accept:application/json' \
-H 'Content-Type: application/json' \
-d '{"messages":[{"role":"system", "content": "You are a helpful assistant."}, {"role":"user", "content": "What is the capital of France?"}], "model": "model_name"}'
Expand All @@ -43,7 +43,7 @@ Add `"stream":true` in your request to make the API send back partial responses
**Request:**

```
curl -X POST https://node_id.gaianet.network/v1/chat/completions \
curl -X POST https://node_id.gaia.domains/v1/chat/completions \
-H 'accept:application/json' \
-H 'Content-Type: application/json' \
-d '{"messages":[{"role":"system", "content": "You are a helpful assistant."}, {"role":"user", "content": "What is the capital of France?"}], "model": "model_name", "stream":true}'
Expand Down Expand Up @@ -99,7 +99,7 @@ The `embeddings` endpoint computes embeddings for user queries or file chunks.
**Request**

```
curl -X POST https://node_id.gaianet.network/v1/embeddings \
curl -X POST https://node_id.gaia.domains/v1/embeddings \
-H 'accept:application/json' \
-H 'Content-Type: application/json' \
-d '{"model": "nomic-embed-text-v1.5.f16", "input":["Paris, city and capital of France, ..., for Paris has retained its importance as a centre for education and intellectual pursuits.", "Paris’s site at a crossroads ..., drawing to itself much of the talent and vitality of the provinces."]}'
Expand Down Expand Up @@ -158,7 +158,7 @@ The `retrieve` endpoint can retrieve text from the node's vector collection base
**Request:**

```
curl -X POST https://node_id.gaianet.network/v1/retrieve \
curl -X POST https://node_id.gaia.domains/v1/retrieve \
-H 'accept:application/json' \
-H 'Content-Type: application/json' \
-d '{"messages":[{"role":"system", "content": "You are a helpful assistant."}, {"role":"user", "content": "What is the location of Paris?"}], "model":"nomic-embed-text-v1.5.f16"}'
Expand Down Expand Up @@ -202,7 +202,7 @@ The `models` endpoint provides the chat and embedding models available on the no
**Request:**

```
curl -X POST https://node_id.gaianet.network/v1/models
curl -X POST https://node_id.gaia.domains/v1/models
```

**Response:**
Expand All @@ -218,7 +218,7 @@ The `info` endpoint provides detailed information about the node.
**Request:**

```
curl -X POST https://node_id.gaianet.network/v1/info
curl -X POST https://node_id.gaia.domains/v1/info
```

**Response:**
Expand Down
Loading

0 comments on commit cab4bdf

Please sign in to comment.