Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webidoo-ai-core Usage Examples

This folder contains practical examples of how to use the webidoo-ai-core library.

Prerequisites

Before running the examples, make sure to:

  1. Install dependencies:

    npm install
  2. Create a .env file in the project root:

    touch .env
  3. Configure environment variables in the .env file:

    • OPENAI_API_KEY: Your OpenAI API key

Available Examples

1. Basic Inference (basic-inference.ts)

Basic example of using InferenceModel to make a request to OpenAI.

npm run basic-inference

2. Streaming Inference (streaming-inference.ts)

Example of using streaming to receive real-time responses from OpenAI.

npm run streaming-inference

3. Tool Calling (tool-calling-inference.ts)

Example of using functions (tool calling) with OpenAI, which allows the model to call user-defined functions.

npm run tool-calling-inference

TODO

  • Add Redis integration examples:
    • Configure Redis URL in .env file: REDIS_URL: Redis connection URL (e.g., redis://localhost:6379)
    • Ensure Redis Stack is running with RediSearch support (required only for advanced examples)
    • Implement vector search examples using Redis
    • Implement vector similarity search examples using Redis

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages