This is a simple demonstration of using Dria retriever in LangChain. Install dependencies with:
bun install
Get your OpenAI API key and Dria API key, and store them in an .env
as:
OPENAI_API_KEY=<your-api-key>
DRIA_API_KEY=<your-api-key>
Run the example code:
bun ask # asks a default query
bun ask "You can write a query here!"
In the console output, you will see the query along with the answers on various knowledge.
Below are some example queries directed towards knowledge on Dria.
What does it mean to 'call'?
- TypeScript Handbook v4.9: To 'call' typically refers to invoking a function or method in programming by using parentheses followed by any necessary arguments. It involves executing the code within the function or method and returning a result or performing a specific action.
- Rust Programming Language: To 'call' means to execute a function or method in programming by using its name followed by a set of parentheses.
- Ethereum Whitepaper: In the context provided, "call" refers to running one step of a program and recording the change in storage.
What is this knowledge about?
- TypeScript Handbook v4.9: This knowledge is about TypeScript, including conditional types, tuple types, object types, generic constraints, distributive conditional types, template literal types, and generic classes.
- Rust Programming Language: Ownership rules and memory management in Rust programming.
- Ethereum Whitepaper: Smart contracts and Ethereum network.
What does the infer
keyword do?
- TypeScript Handbook v4.9: The
infer
keyword is used to declaratively introduce a new generic type variable in conditional types, allowing us to infer types from types we compare against in the true branch of conditional types. - Rust Programming Language: I don't know.
- Ethereum Whitepaper: I don't know.
Where is Merkle Tree used?
- TypeScript Handbook v4.9: I don't know.
- Rust Programming Language: I don't know.
- Ethereum Whitepaper: Merkle Trees are used in various applications including blockchain technology, data storage, decentralized file storage, financial derivatives contracts, and decentralized data feeds.