mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
docs(ci): expand linter scope (#30678)
Expand linter scope to cover `ai` directory as well.
This commit is contained in:
1 parent
2fb8b9f74c
commit
78d0755008
4 files changed
+23
-10
No files matched your search
@@ -28,10 +28,10 @@ jobs:
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
key: 9fd8c8fa7487a3d454a676e6e3d7409af34fc715
|
||||
key: e23c860111349d8bac17b78b1fe632afe84223f9
|
||||
- name: install linter
|
||||
if: steps.cache-cargo.outputs.cache-hit != 'true'
|
||||
run: cargo install --locked --git https://github.com/supabase-community/supa-mdx-lint --rev 9fd8c8fa7487a3d454a676e6e3d7409af34fc715
|
||||
run: cargo install --locked --git https://github.com/supabase-community/supa-mdx-lint --rev e23c860111349d8bac17b78b1fe632afe84223f9
|
||||
- name: install reviewdog
|
||||
uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v1.3.0
|
||||
with:
|
||||
@@ -41,4 +41,4 @@ jobs:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
supa-mdx-lint apps/docs/content/guides/getting-started --format rdf | reviewdog -f=rdjsonl -reporter=github-pr-review
|
||||
supa-mdx-lint apps/docs/content/guides/getting-started apps/docs/content/guides/ai --format rdf | reviewdog -f=rdjsonl -reporter=github-pr-review
|
||||
@@ -28,7 +28,7 @@ Then initialize a new project:
|
||||
poetry new aws_bedrock_image_search
|
||||
```
|
||||
|
||||
## Spin up a Postgres Database with pgvector
|
||||
## Spin up a Postgres database with pgvector
|
||||
|
||||
If you haven't already, head over to [database.new](https://database.new) and create a new project. Every Supabase project comes with a full Postgres database and the [pgvector extension](/docs/guides/database/extensions/pgvector) preconfigured.
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ tocVideo: 'A3uND5sgiO0'
|
||||
|
||||
This guide will walk you through an example using Amazon Bedrock SDK with `vecs`. We will create embeddings using the Amazon Titan Embeddings G1 – Text v1.2 (amazon.titan-embed-text-v1) model, insert these embeddings into a PostgreSQL database using vecs, and then query the collection to find the most similar sentences to a given query sentence.
|
||||
|
||||
## Create an Environment
|
||||
## Create an environment
|
||||
|
||||
First, you need to set up your environment. You will need Python 3.7+ with the `vecs` and `boto3` libraries installed.
|
||||
|
||||
@@ -25,7 +25,7 @@ You'll also need:
|
||||
- [Credentials to your AWS account](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html)
|
||||
- [A Postgres Database with the pgvector extension](hosting.md)
|
||||
|
||||
## Create Embeddings
|
||||
## Create embeddings
|
||||
|
||||
Next, we will use Amazon’s Titan Embedding G1 - Text v1.2 model to create embeddings for a set of sentences.
|
||||
|
||||
@@ -67,7 +67,7 @@ for sentence in dataset:
|
||||
|
||||
```
|
||||
|
||||
### Store the Embeddings with vecs
|
||||
### Store the embeddings with vecs
|
||||
|
||||
Now that we have our embeddings, we can insert them into a PostgreSQL database using vecs.
|
||||
|
||||
@@ -90,7 +90,7 @@ sentences.upsert(records=embeddings)
|
||||
sentences.create_index()
|
||||
```
|
||||
|
||||
### Querying for Most Similar Sentences
|
||||
### Querying for most similar sentences
|
||||
|
||||
Now, we query the `sentences` collection to find the most similar sentences to a sample query sentence. First need to create an embedding for the query sentence. Next, we query the collection we created earlier to find the most similar sentences.
|
||||
|
||||
|
||||
@@ -5,32 +5,42 @@ ignore_patterns = ["**/_*.mdx"]
|
||||
# Words that may be uppercased even if they are not the first word in the sentence.
|
||||
# Can also specify a regex that is compatible with the [Rust regex crate](https://docs.rs/regex/latest/regex/).
|
||||
may_uppercase = [
|
||||
"[A-Z]{3,5}",
|
||||
"[A-Z0-9]{2,5}",
|
||||
"Android",
|
||||
"Angular",
|
||||
"Apple",
|
||||
"Auth",
|
||||
"ChatGPT",
|
||||
"Content Delivery Network",
|
||||
"Dart",
|
||||
"Edge Functions",
|
||||
"Edge Functions?",
|
||||
"Flutter",
|
||||
"GoTrue",
|
||||
"Google",
|
||||
"GraphQL",
|
||||
"Hugging Face",
|
||||
"I",
|
||||
"IVFFlat",
|
||||
"Ionic Angular",
|
||||
"Ionic React",
|
||||
"Ionic Vue",
|
||||
"JavaScript",
|
||||
"Kotlin",
|
||||
"Navigable Small World",
|
||||
"Next.js",
|
||||
"Nuxt",
|
||||
"OpenAI",
|
||||
"Poetry",
|
||||
"Postgres",
|
||||
"PostgreSQL",
|
||||
"PostgREST",
|
||||
"Python",
|
||||
"React",
|
||||
"React Native",
|
||||
"Reciprocal Ranked Fusion",
|
||||
"RedwoodJS",
|
||||
"Retrieval Plugin",
|
||||
"Roboflow Inference",
|
||||
"Row Level Security",
|
||||
"Server-Side Auth",
|
||||
"Single Sign-On",
|
||||
@@ -40,8 +50,11 @@ may_uppercase = [
|
||||
"SvelteKit",
|
||||
"Swift",
|
||||
"SwiftUI",
|
||||
"TypeScript",
|
||||
"Xcode",
|
||||
"Vecs",
|
||||
"Vue",
|
||||
"Wrappers",
|
||||
]
|
||||
# Words that may be lowercased even if they are the first word in the sentence.
|
||||
# Can also specify a regex that is compatible with the [Rust regex crate](https://docs.rs/regex/latest/regex/).
|
||||
|
||||
Reference in new issue
Block a user