-
Notifications
You must be signed in to change notification settings - Fork 49
docs: create documentation for Alchemyst AI Retriever #734
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
Open
anuran-roy
wants to merge
29
commits into
langchain-ai:main
Choose a base branch
from
Alchemyst-ai:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+83
−0
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
48e51c6
Create documentation for Alchemyst AI Retriever
anuran-roy d4a3903
[ADD] Added code snippets for Alchemyst Retriever
anuran-roy ab69f3f
Merge pull request #1 from anuran-roy/main
anuran-roy 2e9cae5
[MINOR] Minor fixes to Langchain retriever documentation
anuran-roy 4ea4665
Merge branch 'langchain-ai:main' into main
anuran-roy d8e1c3e
[MINOR] Minor fixes to Langchain retriever documentation
anuran-roy 3d43325
Merge branch 'main' of https://github.com/Alchemyst-ai/langchain-docs
anuran-roy b20a3d9
Update src/oss/javascript/integrations/retrievers/alchemystai-retriev…
anuran-roy 439dd96
Update src/oss/javascript/integrations/retrievers/alchemystai-retriev…
anuran-roy 6f8d124
Merge branch 'main' into main
anuran-roy ca71fa1
[MINOR] Minor fixes to Langchain retriever documentation
anuran-roy 7668721
[MINOR] Minor fixes to Langchain retriever documentation
anuran-roy 43e494c
Merge branch 'main' into main
anuran-roy 148abc6
Update src/snippets/javascript-integrations/examples/retrievers/alche…
anuran-roy 29adbf2
Merge branch 'main' into main
anuran-roy ae4fc12
Update src/snippets/javascript-integrations/examples/retrievers/alche…
anuran-roy 180c5fd
[ADD] Added frontmatter for article
anuran-roy ad19ccd
[MODIFY] Shifted the example from Docusaurus CodeBlock to Mintlify
anuran-roy 67645b8
Update src/snippets/javascript-integrations/examples/retrievers/alche…
anuran-roy 814b384
Update src/oss/javascript/integrations/retrievers/alchemystai-retriev…
anuran-roy 142a074
Update src/oss/javascript/integrations/retrievers/alchemystai-retriev…
anuran-roy cfa68af
[MODIFY] Enhanced the support section
anuran-roy 9ef88f5
Merge branch 'main' of https://github.com/Alchemyst-ai/langchain-docs
anuran-roy d4b7414
[MINOR] Minor fixes
anuran-roy 890ff3e
Update src/oss/javascript/integrations/retrievers/alchemystai-retriev…
anuran-roy c23800c
[MODIFY] Fix retriever example reuse
anuran-roy 8c746e2
Update src/oss/javascript/integrations/retrievers/alchemystai-retriev…
anuran-roy 839739c
Update src/oss/javascript/integrations/retrievers/alchemystai-retriev…
anuran-roy ef5999a
Update src/oss/javascript/integrations/retrievers/alchemystai-retriev…
anuran-roy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
src/oss/javascript/integrations/retrievers/alchemystai-retriever.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: Alchemyst AI Retriever | ||
description: "Integrate the Alchemyst AI Retriever into your Generative AI Application" | ||
--- | ||
|
||
# Alchemyst AI Retriever | ||
|
||
The [**Alchemyst AI Retriever**](https://getalchemystai.com) enables your generative AI applications to retrieve relevant context and knowledge. It sources this information from the Alchemyst platform. It provides a unified interface for accessing, searching, and retrieving data to enhance LLM and agent responses. | ||
## Setup | ||
|
||
1. If you don't have an account, [sign up for a new account](https://platform.getalchemystai.com/signup) on the Alchemyst Platform. | ||
2. After logging in, go to [**Alchemyst Platform Settings**](https://platform.getalchemystai.com/settings) to get your API keys. | ||
|
||
import IntegrationInstallTooltip from '/snippets/javascript-integrations/integration-install-tooltip.mdx'; | ||
|
||
<IntegrationInstallTooltip></IntegrationInstallTooltip> | ||
|
||
<CodeGroup> | ||
```sh npm | ||
npm i @alchemystai/langchain-js | ||
``` | ||
|
||
```sh yarn | ||
yarn add @alchemystai/langchain-js | ||
``` | ||
|
||
```sh pnpm | ||
pnpm add @alchemystai/langchain-js | ||
``` | ||
|
||
```sh bun | ||
bun add @alchemystai/langchain-js | ||
``` | ||
</CodeGroup> | ||
|
||
## Usage | ||
|
||
import AlchemystAiRetrieverExample from "/snippets/javascript-integrations/examples/retrievers/alchemystai.mdx"; | ||
|
||
<AlchemystAiRetrieverExample /> | ||
|
||
## Support and Feedback | ||
For support, feedback, or to report issues, please visit the [Alchemyst AI Documentation](https://docs.getalchemystai.com), where you'll find the latest contact and community information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/snippets/javascript-integrations/examples/retrievers/alchemystai.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
```typescript | ||
import { AlchemystRetriever } from "@alchemystai/langchain-js"; | ||
import { RunnableSequence } from "@langchain/core/runnables"; | ||
import dotenv from "dotenv"; | ||
|
||
dotenv.config(); | ||
|
||
// Instantiate the retriever with your API key and optional config | ||
const retriever = new AlchemystRetriever({ | ||
apiKey: process.env.ALCHEMYST_AI_API_KEY!, | ||
similarityThreshold: 0.8, | ||
minimumSimilarityThreshold: 0.5, | ||
scope: "internal" | ||
}); | ||
|
||
// Example: Use the retriever in a LangChain pipeline | ||
async function main() { | ||
// Create a simple pipeline that retrieves documents and outputs their content | ||
const pipeline = RunnableSequence.from([ | ||
async (input: string) => { | ||
const docs = await retriever.getRelevantDocuments(input); | ||
return docs.map(doc => doc.pageContent).join("\n---\n"); | ||
} | ||
]); | ||
|
||
const query = "Show me the latest HR policies"; // Put your business/practical query here | ||
const result = await pipeline.invoke(query); | ||
|
||
console.log("Retrieved Documents:\n", result); | ||
} | ||
|
||
main().catch(console.error); | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.