Skip to content

Commit b31e709

Browse files
authored
Merge pull request #604 from subquery/feat/pipeline-rag-data
feat: pipeline rag data
2 parents 9bc2b46 + 8d989b1 commit b31e709

File tree

4 files changed

+111
-0
lines changed

4 files changed

+111
-0
lines changed

.github/workflows/deploy-rag.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy RAG Data - academy.subquery.network
2+
on:
3+
push:
4+
branches:
5+
- master
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
env:
12+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install pnpm
18+
uses: pnpm/action-setup@v2
19+
with:
20+
run_install: true
21+
22+
- name: Setup Deno
23+
uses: denoland/setup-deno@v2
24+
with:
25+
deno-version: "2.2.2"
26+
cache: pnpm
27+
28+
- name: Install subql-ai
29+
run: deno install -g -f --allow-env --allow-sys --allow-net --allow-import --allow-read --allow-write --allow-ffi --allow-run --unstable-worker-options --no-prompt -n subql-ai jsr:@subql/ai-app-framework/cli
30+
31+
- name: Build rag
32+
run: subql-ai embed-mdx -i docs -o dist -t subql-docs --model text-embedding-3-large --openAiApiKey $OPENAI_API_KEY
33+
34+
- name: Tar dist
35+
run: tar -czvf db-openai.tar.gz dist
36+
37+
- name: Commit changes
38+
uses: EndBug/add-and-commit@v5
39+
with:
40+
message: "Submit Build Rag Data"
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
43+
44+
- name: Redeploy subquery-ai
45+
run: |
46+
curl --request POST \
47+
--url 'https://api.bitbucket.org/2.0/repositories/onfinalitydev/pipeline-ai/pipelines' \
48+
--header 'Authorization: Bearer ${{ secrets.BITBUCKET_ACCESS_TOKEN }}' \
49+
--header 'Accept: application/json' \
50+
--header 'Content-Type: application/json' \
51+
--data '
52+
{
53+
"target": {
54+
"selector": {
55+
"type": "custom",
56+
"pattern": "only-redeploy"
57+
},
58+
"type": "pipeline_ref_target",
59+
"ref_name": "main",
60+
"ref_type": "branch"
61+
}
62+
}'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
55
.idea
66

7+
temp
8+
79
# CMake
810
cmake-build-*/
911

db-openai.tar.gz

65.6 MB
Binary file not shown.

docs/subquery_network/faq.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,50 @@ Depends on the provider, SubQuery don't dictate this. But SubQuery gateway encou
2828
## Is there a testnet environment?
2929

3030
Yes, be sure to check https://dev.thechaindata.com/
31+
32+
## Is there a meaning behind SubQuery's name?
33+
34+
The name "SubQuery" refers to its function in the blockchain ecosystem. A subquery is essentially a query within another query, allowing users to access data more efficiently. It is a powerful tool for indexing and querying blockchain data.
35+
36+
## What was the first network that SubQuery first supported?
37+
38+
SubQuery initially supported the Polkadot network, focusing on indexing and querying data for the Polkadot and its parachains.
39+
40+
## How many networks do SubQuery support now?
41+
42+
As of now, SubQuery supports multiple networks, including Polkadot, Kusama, Ethereum, and many others, expanding its reach to a wide array of blockchain ecosystems.
43+
44+
## How does SubQuery improve blockchain data access?
45+
46+
SubQuery enhances blockchain data access by providing an indexing layer that aggregates and organizes data from blockchain networks. This allows developers and applications to quickly retrieve and interact with data in a structured and efficient manner.
47+
48+
## How does SubQuery differ from traditional block explorers?
49+
50+
Traditional block explorers allow users to explore blockchain data in a static, non-queryable format. SubQuery, on the other hand, provides dynamic and customizable data querying, giving developers the ability to filter, process, and retrieve data in real-time for their applications.
51+
52+
## What programming languages does SubQuery support?
53+
54+
SubQuery primarily supports JavaScript and TypeScript for building queries and processing data. Developers can use these languages to define the structure and logic for data retrieval from supported networks.
55+
56+
## Is SubQuery open-source?
57+
58+
Yes, SubQuery is open-source. It encourages developers to contribute to its growth and use its tools to build decentralized applications (dApps) more efficiently. The source code is available on GitHub.
59+
60+
## What are the main use cases for SubQuery?
61+
62+
SubQuery is used for various purposes, such as:
63+
- Building decentralized applications (dApps) that need to access blockchain data.
64+
- Indexing and querying blockchain data for analysis and reporting.
65+
- Creating custom data solutions for blockchain ecosystems and decentralized finance (DeFi) platforms.
66+
67+
## Can I deploy SubQuery on my own infrastructure?
68+
69+
Yes, SubQuery can be deployed on your own infrastructure, whether on-premise or in the cloud. It offers flexibility to users who want complete control over their indexing and querying solutions.
70+
71+
## How does SubQuery handle data updates and changes?
72+
73+
SubQuery continuously updates its data by monitoring blockchain events in real-time. This ensures that the indexed data is always up to date, and any changes to the blockchain are reflected immediately in the data queries.
74+
75+
## How can I get started with SubQuery?
76+
77+
To get started with SubQuery, you can visit their official documentation, which provides step-by-step guides on setting up a project, writing queries, and deploying them on supported networks. The community also offers support through forums and Discord.

0 commit comments

Comments
 (0)