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

docs(readme): fix code formatting #2007

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
26 changes: 13 additions & 13 deletions js/testapps/vertexai-reranker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@ Before running this sample, ensure you have the following:

Clone this repository to your local machine and navigate to the project directory. Then, install the necessary dependencies:

\`\`\`bash
```bash
pnpm install
\`\`\`
```

### Step 2: Set Up Environment Variables

Create a \`.env\` file in the root directory and set the following variables. You can use the provided \`.env.example\` as a reference.
Create a `.env` file in the root directory and set the following variables. You can use the provided `.env.example` as a reference.

\`\`\`plaintext
```plaintext
PROJECT_ID=your_project_id_here
LOCATION=your_location_here
\`\`\`
```

These variables are required to configure the Vertex AI project and location for reranking.

### Step 3: Run the Sample

Start the Genkit server:

\`\`\`bash
```bash
genkit start
\`\`\`
```

This will launch the server that hosts the reranking flow.

Expand All @@ -55,9 +55,9 @@ This sample demonstrates how to use the Vertex AI plugin to rerank a predefined

### Rerank Flow

The \`rerankFlow\` function takes a query as input, reranks the predefined document content using the Vertex AI semantic reranker, and returns the documents sorted by relevance score.
The `rerankFlow` function takes a query as input, reranks the predefined document content using the Vertex AI semantic reranker, and returns the documents sorted by relevance score.

\`\`\`typescript
```typescript
export const rerankFlow = defineFlow(
{
name: 'rerankFlow',
Expand Down Expand Up @@ -88,15 +88,15 @@ const reranker = 'vertexai/reranker';

}
);
\`\`\`
```

### Running the Server

The server is started using the \`startFlowsServer\` function, which sets up the Genkit server to handle flow requests.
The server is started using the `startFlowsServer` function, which sets up the Genkit server to handle flow requests.

\`\`\`typescript
```typescript
startFlowsServer();
\`\`\`
```

## License

Expand Down
Loading