ProductPromotion
Logo

Angular.JS

made by https://0x3d.site

GitHub - arolleaguekeng/ng-flexbot
Contribute to arolleaguekeng/ng-flexbot development by creating an account on GitHub.
Visit Site

GitHub - arolleaguekeng/ng-flexbot

GitHub - arolleaguekeng/ng-flexbot

ng-flexbot

Welcome to ng-flexbot! šŸš€

ng-flexbot is an open-source Angular UI library designed to create chatbots with just a few lines of code. It allows you to select from various models, such as GPT and Google Gemini, and customize the chatbotā€™s behavior using a prompt context.

Why ng-flexbot?

ng-flexbot Logo MIT License npm version GitHub pull request check state Are you looking for a streamlined way to integrate chatbots into your Angular applications? ng-flexbot simplifies this process by providing an easy-to-use UI component that integrates with popular language models. With ng-flexbot, you can:

  • Quickly add a chatbot to your Angular app with minimal setup.
  • Choose from a range of language models, including GPT and Google Gemini.
  • Customize the chatbotā€™s focus with a prompt context.

And thatā€™s not all! Weā€™re continuously improving ng-flexbot and have exciting plans for future updates.

Key Features

  • Easy Integration: Simple setup with a few lines of code.
  • Model Selection: Choose from various language models, including:
  • Prompt Context: Define the subject the chatbot will focus on.

Installation

To get started with ng-flexbot, install it as an npm package:

npm install ng-flexbot

Usage

Hereā€™s a quick example of how to use ng-flexbot in your Angular project:

write this configuration on your app.config.ts file

import { provideHttpClient, withFetch } from '@angular/common/http';
import { provideMarkdown } from 'ngx-markdown';
export const appConfig: ApplicationConfig = {
  providers: [provideHttpClient(withFetch()), provideMarkdown()],
};

HTML

<div class="container">
  <lib-ng-flexbot
   [googleApikey]="googleApikey" 
   [openaiApikey]="openaiApikey" 
   [promptContext]="promptContext" 
   [textModel]="textModel" 
   [imageModel]="imageModel" 
   [title]="title" 
   [welcomeMessage]="welcomeMessage"
  />
</div>

TypeScript

import { Component } from '@angular/core';
import { NgFlexbotComponent } from 'ng-flexbot';
import { FlexbotCurrentImageModel, FlexbotCurrentTextModel } from '@ng-flexbot/ng-flexbot/models/flexbot-current-llm.enum';


@Component({
  standalone: true,
  imports: [NgFlexbotComponent],
  selector: 'app-root',
    styles: [
    `
      .container {
        height: 100vh;
      }
    `,
  ],
})
export class AppComponent {
  title = 'flexbot-demo';
  googleApikey = "[YOUR_GOOGLE_API_KEY]";
  openaiApikey = "[YOUR_OPENAI_API_KEY]";
  promptContext = "you only know questions about Angular"
  textModel = FlexbotCurrentTextModel.GOOGLE_GEMINI_PRO;
  imageModel = FlexbotCurrentImageModel.OPEN_AI_GPT_4o_MINI;
  welcomeMessage = "Welcome to Flexbot!";
}

API Keys

To use ng-flexbot, you need API keys for the selected language models. You can obtain these keys from the following platforms:

Available Models

ng-flexbot supports the following models:

Text Models

  • Google Models

    • GOOGLE_GEMINI_PRO (google/gemini-pro)
    • GOOGLE_MEDULLA_2 (google/medulla-2)
  • OpenAI models

    • OPEN_AI_GPT_3 (openai/gpt-3)
    • OPEN_AI_GPT_3_CHAT (openai/gpt-3-chat)
    • OPEN_AI_GPT_4 (openai/gpt-4)
    • OPEN_AI_GPT_4_TURBO (openai/gpt-4-turbo)
    • OPEN_AI_GPT_3_5_TURBO (openai/gpt-3.5-turbo)
    • OPEN_AI_TEXT_DAVINCI_003 (openai/text-davinci-003)

Image Models

  • Google Models

    • GOOGLE_GEMINI_1_5_FLASH (google/gemini-1.5-flash)
  • OpenAI Models

    • OPEN_AI_DALL_E_3 (openai/dall-e-3)
    • OPEN_AI_DALL_E_2 (openai/dall-e-2)

Contributions

We welcome contributions from the community! Since ng-flexbot is a monorepo created with Nx, please follow these steps to contribute:

  1. Fork this repository.
  2. Clone your fork and navigate to the ng-flexbot directory:
    git clone https://github.com/your-username/ng-flexbot.git
    cd ng-flexbot
    
  3. Install dependencies and set up the Nx workspace:
    npm install
    npx nx install
    
  4. Create your feature branch:
    git checkout -b feature/your-feature-name
    
  5. Make your changes and test them using Nx commands:
    npx nx test
    npx nx build
    
  6. Commit your changes:
    git commit -m 'Adding a new feature'
    
  7. Push your branch:
    git push origin feature/your-feature-name
    
  8. Open a pull request on GitHub.

We appreciate all contributions, big or small!

License

This project is licensed under the MIT License. For more details, see the LICENSE.md file or visit the MIT License Website.

Feedback

If you have any feedback, please reach out to us at [email protected].

#Angular #Chatbot #OpenSource #UI #JavaScript #Innovation #gemini #chatgpt #AngularLibrary #ChatbotUI #AngularComponents #DeveloperTools #AI #MachineLearning #GPT #GoogleGemini

More Resources
to explore the angular.

mail [email protected] to add your project or resources here šŸ”„.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here šŸ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory