From 1db2d5098204730475dfa1781bd0cdeb0b71a222 Mon Sep 17 00:00:00 2001 From: Salmen Hichri Date: Wed, 14 Feb 2024 00:33:48 +0000 Subject: [PATCH] Updated README.md and nlux name casing --- README.md | 40 +++++++++---------- package.json | 4 +- packages/js/core/src/core/aiChat.ts | 34 ++++++++-------- packages/js/core/src/types/adapter.ts | 2 +- packages/js/hf/src/hf/builder/builder.ts | 16 ++++++-- .../src/langserve/types/adapterOptions.ts | 2 +- packages/js/openai/src/createAdapter.ts | 4 +- .../openai/src/openai/gpt/adapters/adapter.ts | 12 +++--- .../openai/src/openai/gpt/builders/builder.ts | 10 +++-- packages/react/openai/src/hooks/useAdapter.ts | 4 +- pipeline/contrib/README.md | 2 +- pipeline/npm/core/README.md | 26 ++++++------ pipeline/npm/core/package.template.json | 2 +- pipeline/npm/hf-react/README.md | 14 +++---- pipeline/npm/hf-react/package.template.json | 2 +- pipeline/npm/hf/README.md | 14 +++---- pipeline/npm/hf/package.template.json | 2 +- pipeline/npm/highlighter/README.md | 12 +++--- .../npm/highlighter/package.template.json | 2 +- pipeline/npm/langchain-react/README.md | 16 ++++---- .../npm/langchain-react/package.template.json | 2 +- pipeline/npm/langchain/README.md | 16 ++++---- pipeline/npm/langchain/package.template.json | 2 +- pipeline/npm/markdown/README.md | 6 +-- pipeline/npm/markdown/package.template.json | 2 +- pipeline/npm/openai-react/README.md | 16 ++++---- .../npm/openai-react/package.template.json | 2 +- pipeline/npm/openai/README.md | 16 ++++---- pipeline/npm/openai/package.template.json | 2 +- pipeline/npm/react/README.md | 24 +++++------ pipeline/npm/react/package.template.json | 2 +- pipeline/npm/themes/package.template.json | 2 +- pipeline/scripts/dev.mjs | 2 +- pipeline/scripts/set.mjs | 2 - pipeline/scripts/version.mjs | 2 +- pipeline/utils/log.mjs | 8 ++-- .../utils/rollup/replaceImportedModules.ts | 0 samples/emulator/package.json | 2 +- .../01-vanilla-js-with-adapters/index.html | 2 +- .../src/02-vanilla-js-with-events/index.html | 2 +- .../03-react-js-with-hugging-face/index.html | 2 +- .../adapters/einbotFetch.ts | 2 +- .../adapters/einbotStream.ts | 2 +- .../src/04-react-js-with-langserve/index.html | 2 +- .../src/05-react-js-with-adapters/index.html | 2 +- .../src/06-react-js-personas/index.html | 2 +- .../src/07-react-js-events/index.html | 2 +- .../08-react-js-with-conv-history/index.html | 2 +- samples/emulator/src/index.html | 20 +++++----- specs/package.json | 2 +- yarn.lock | 20 +++++----- 51 files changed, 199 insertions(+), 191 deletions(-) delete mode 100644 pipeline/utils/rollup/replaceImportedModules.ts diff --git a/README.md b/README.md index 7c66070e..46da5126 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ -# [NLUX](https://nlux.ai) ๐ŸŒฒโœจ๐Ÿ’ฌ +# [nlux](https://nlux.ai) ๐ŸŒฒโœจ๐Ÿ’ฌ ![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-1ccb61) [![npm version](https://img.shields.io/badge/NPM-@nlux/react-1ccb61)](https://www.npmjs.com/package/@nlux/react) -[![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-fa896b)](https://nlux.dev) +[![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-fa896b)](https://nlux.dev) ## The JS / React Library For Building Conversational AI Interfaces โœจ๐Ÿ’ฌ -NLUX _(for Natural Language User Experience)_ is an open-source Javascript library that makes it super simple to +[![nlux UI For Any LLM](https://nlux.ai/images/github/nlux-ui-for-llms-banner.gif)](https://nlux.dev) + +`nlux` (for Natural Language User Experience) is an open-source Javascript library that makes it super simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM. @@ -24,12 +26,12 @@ of code, you can add conversational AI capabilities and interact with your favou ## Repo Content ๐Ÿ“ฆ -This GitHub repository contains the source code for the NLUX library.
+This GitHub repository contains the source code for the `nlux` library.
It is a monorepo that contains the following NPM packages: **React JS Packages:** -* [`@nlux/react`](https://www.npmjs.com/package/@nlux/react) โ€• React JS components for NLUX. +* [`@nlux/react`](https://www.npmjs.com/package/@nlux/react) โ€• React JS components for `nlux`. * [`@nlux/langchain-react`](https://www.npmjs.com/package/@nlux/langchain-react) โ€• React hooks and adapter for APIs created using LangChain's LangServe library. * [`@nlux/openai-react`](https://www.npmjs.com/package/@nlux/openai-react) โ€• React hooks for the OpenAI API. @@ -56,25 +58,25 @@ Please visit each package's NPM page for information on how to use it. ## Docs & Examples ๐Ÿคฉ -* For developer documentation, examples, and API reference โ€• please visit: **[NLUX.dev](https://nlux.dev/)** +* For developer documentation, examples, and API reference โ€• please visit: **[nlux.dev](https://nlux.dev/)** ## Design Principles โšœ๏ธ -The following design principles guide the development of NLUX: +The following design principles guide the development of `nlux`: -* **Intuitive** โ€• Interactions enabled by NLUX should be intuitive. +* **Intuitive** โ€• Interactions enabled by `nlux` should be intuitive. Usage should unfold naturally without obstacles or friction. No teaching or thinking - should be required to use UI built with NLUX. + should be required to use UI built with `nlux`. -* **Performance** โ€• NLUX should be as fast as possible. Fast to load, fast to render +* **Performance** โ€• `nlux` should be as fast as possible. Fast to load, fast to render and update, fast to respond to user input. To achieve that, we should avoid unnecessary work, optimize for performance, minimize bundle size, and not depend on external libraries. -* **Accessibility** โ€• UI built with NLUX should be accessible to everyone. It should be usable +* **Accessibility** โ€• UI built with `nlux` should be accessible to everyone. It should be usable by people with disabilities, on various devices, in various environments, and using various input methods (keyboard, touch, voice). -* **DX** โ€• NLUX recognizes developers as first-class citizens. The library should enable an +* **DX** โ€• `nlux` recognizes developers as first-class citizens. The library should enable an optimal DX (developer experience). It should be effortless to use, easy to understand, and simple to extend. Stellar documentation should be provided. The feature roadmap should evolve aligning to developer needs voiced. @@ -86,25 +88,21 @@ cross platforms, with a focus on performance and usability. ## Community & Support ๐Ÿ™ ---- - -* **Star The Repo** ๐ŸŒŸ โ€• If you like NLUX, please star the repo to show your support. - ---- - +* **Star The Repo** ๐ŸŒŸ โ€• If you like `nlux`, please star the repo to show your support. + Your support is what keeps this open-source project going ! ๐Ÿงก * **[GitHub Discussions](https://github.com/nluxai/nlux/discussions)** โ€• Ask questions, report issues, and share your ideas with the community. * **[Discord Community](https://discord.gg/VY4TDaf4)** โ€• Join our Discord server to chat with the community and get support. -* **[NLUX.dev](https://nlux.dev/)** Developers Website โ€• Examples, learning resources, and API reference. +* **[nlux.dev](https://nlux.dev/)** Developer Website โ€• Examples, learning resources, and API reference. ## License ๐Ÿ“ƒ -NLUX is licensed under the terms of the Mozilla Public License 2.0.
+`nlux` is licensed under the terms of the Mozilla Public License 2.0.
Wondering what that means? Learn more on [MPL 2.0 FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/). ## About The Developer ๐Ÿ‘จโ€๐Ÿ’ป -NLUX is a new open-source project that's being led by [Salmen Hichri](https://github.com/salmenus), a senior front-end +`nlux` is a new open-source project that's being led by [Salmen Hichri](https://github.com/salmenus), a senior front-end engineer with over a decade of experience building user interfaces and developer tools at companies like Amazon and Goldman Sachs, and contributions to open-source projects. diff --git a/package.json b/package.json index f1baa2bf..cab0d9cd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@nlux/monorepo", "version": "latest", - "description": "NLUX is a JavaScript and React JS library for building conversational AI experiences.", + "description": "nlux is a JavaScript and React JS library for building conversational AI experiences.", "author": "Salmen Hichri", "license": "MPL-2.0", "homepage": "https://nlux.ai", @@ -27,7 +27,7 @@ "devDependencies": { "symlink-dir": "^5.2.1", "jsdom": "^22.1.0", - "typescript": "5.2.2", + "typescript": "^5.3.3", "vite": "^5.1.0" }, "bugs": "https://github.com/nluxai/nlux/issues", diff --git a/packages/js/core/src/core/aiChat.ts b/packages/js/core/src/core/aiChat.ts index 6f7b3b3b..21e65dc8 100644 --- a/packages/js/core/src/core/aiChat.ts +++ b/packages/js/core/src/core/aiChat.ts @@ -38,7 +38,7 @@ export class AiChat implements IAiChat { if (!this.controller) { throw new NluxRenderingError({ source: this.constructor.name, - message: 'Unable to hide. NLUX is not mounted.', + message: 'Unable to hide. nlux is not mounted.', }); } @@ -49,7 +49,7 @@ export class AiChat implements IAiChat { if (this.mounted) { throw new NluxUsageError({ source: this.constructor.name, - message: 'Unable to create NLUX instance. NLUX is already mounted. ' + message: 'Unable to create nlux instance. nlux is already mounted. ' + 'Make sure to call `unmount()` before mounting again.', }); } @@ -63,8 +63,8 @@ export class AiChat implements IAiChat { if (!adapterToUser) { throw new NluxValidationError({ source: this.constructor.name, - message: 'Unable to create NLUX instance. Adapter is not properly set. ' - + 'You should call `withAdapter(adapter)` method before mounting NLUX.', + message: 'Unable to create nlux instance. Adapter is not properly set. ' + + 'You should call `withAdapter(adapter)` method before mounting nlux.', }); } @@ -144,7 +144,7 @@ export class AiChat implements IAiChat { if (!this.controller) { throw new NluxRenderingError({ source: this.constructor.name, - message: 'Unable to show. NLUX is not mounted.', + message: 'Unable to show. nlux is not mounted.', }); } @@ -152,10 +152,10 @@ export class AiChat implements IAiChat { } public unmount() { - debug('Unmounting NLUX.'); + debug('Unmounting nlux.'); if (!this.controller) { - debug('Invalid call to aiChat.unmount() on an already unmounted NLUX instance!'); + debug('Invalid call to aiChat.unmount() on an already unmounted nlux instance!'); return; } @@ -175,7 +175,7 @@ export class AiChat implements IAiChat { if (!this.controller) { throw new NluxRenderingError({ source: this.constructor.name, - message: 'Unable to update props. NLUX is not mounted.', + message: 'Unable to update props. nlux is not mounted.', }); } @@ -186,7 +186,7 @@ export class AiChat implements IAiChat { if (this.mounted) { throw new NluxUsageError({ source: this.constructor.name, - message: 'Unable to set adapter. NLUX is already mounted.', + message: 'Unable to set adapter. nlux is already mounted.', }); } @@ -234,7 +234,7 @@ export class AiChat implements IAiChat { if (this.mounted) { throw new NluxUsageError({ source: this.constructor.name, - message: 'Unable to set class name. NLUX is already mounted.', + message: 'Unable to set class name. nlux is already mounted.', }); } @@ -253,7 +253,7 @@ export class AiChat implements IAiChat { if (this.mounted) { throw new NluxUsageError({ source: this.constructor.name, - message: 'Unable to set conversation options. NLUX is already mounted.', + message: 'Unable to set conversation options. nlux is already mounted.', }); } @@ -272,7 +272,7 @@ export class AiChat implements IAiChat { if (this.mounted) { throw new NluxUsageError({ source: this.constructor.name, - message: 'Unable to set conversation history. NLUX is already mounted.', + message: 'Unable to set conversation history. nlux is already mounted.', }); } @@ -291,7 +291,7 @@ export class AiChat implements IAiChat { if (this.mounted) { throw new NluxUsageError({ source: this.constructor.name, - message: 'Unable to set layout options. NLUX is already mounted.', + message: 'Unable to set layout options. nlux is already mounted.', }); } @@ -311,7 +311,7 @@ export class AiChat implements IAiChat { if (this.mounted) { throw new NluxUsageError({ source: this.constructor.name, - message: 'Unable to set personaOptions. NLUX is already mounted.', + message: 'Unable to set personaOptions. nlux is already mounted.', }); } @@ -330,7 +330,7 @@ export class AiChat implements IAiChat { if (this.mounted) { throw new NluxUsageError({ source: this.constructor.name, - message: 'Unable to set prompt box options. NLUX is already mounted.', + message: 'Unable to set prompt box options. nlux is already mounted.', }); } @@ -349,7 +349,7 @@ export class AiChat implements IAiChat { if (this.mounted) { throw new NluxUsageError({ source: this.constructor.name, - message: 'Unable to set code highlighter. NLUX is already mounted.', + message: 'Unable to set code highlighter. nlux is already mounted.', }); } @@ -368,7 +368,7 @@ export class AiChat implements IAiChat { if (this.mounted) { throw new NluxUsageError({ source: this.constructor.name, - message: 'Unable to set theme. NLUX is already mounted.', + message: 'Unable to set theme. nlux is already mounted.', }); } diff --git a/packages/js/core/src/types/adapter.ts b/packages/js/core/src/types/adapter.ts index e3d7ea39..d1d92e3c 100644 --- a/packages/js/core/src/types/adapter.ts +++ b/packages/js/core/src/types/adapter.ts @@ -23,7 +23,7 @@ export interface Adapter { fetchText?: (message: string, extras: AdapterExtras) => Promise; /** - * This method should be implemented by any adapter to be used with NLUX. + * This method should be implemented by any adapter to be used with nlux. * Either this method or `fetchText` (or both) should be implemented by any adapter. * * @param {string} message diff --git a/packages/js/hf/src/hf/builder/builder.ts b/packages/js/hf/src/hf/builder/builder.ts index 88bd3acb..542a5900 100644 --- a/packages/js/hf/src/hf/builder/builder.ts +++ b/packages/js/hf/src/hf/builder/builder.ts @@ -5,12 +5,13 @@ import {HfOutputPreProcessor} from '../types/outputPreProcessor'; export interface HfAdapterBuilder extends AdapterBuilder { /** * Create a new Hugging Face Inference API adapter. - * Adapter users don't need to call this method directly. It will be called by NLUX when the adapter is expected + * Adapter users don't need to call this method directly. It will be called by nlux when the adapter is expected * to be created. * * @returns {StandardAdapter} */ create(): StandardAdapter; + /** * The authorization token to use for Hugging Face Inference API. * This will be passed to the `Authorization` header of the HTTP request. @@ -24,9 +25,10 @@ export interface HfAdapterBuilder extends AdapterBuilder { * @returns {AdapterBuilder} */ withAuthToken(authToken: string): HfAdapterBuilder; + /** * Instruct the adapter to connect to API and load data either in streaming mode or in fetch mode. - * The `stream` mode would use protocols such as websockets or server-side events, and NLUX will display data as + * The `stream` mode would use protocols such as websockets or server-side events, and nlux will display data as * it's being generated by the server. The `fetch` mode would use a single request to fetch data, and the response * would only be displayed once the entire message is loaded. * @@ -35,17 +37,19 @@ export interface HfAdapterBuilder extends AdapterBuilder { * @returns {AdapterBuilder} */ withDataTransferMode(mode: DataTransferMode): HfAdapterBuilder; + /** * The endpoint to use for Hugging Face Inference API. * You should provide either a model or an endpoint, but not both. * For more information, please refer to the - * [NLUX Hugging Face documentation](https://docs.nlux.ai/category/nlux-with-hugging-face). + * [nlux Hugging Face documentation](https://docs.nlux.ai/category/nlux-with-hugging-face). * * @optional * @param {string} endpoint * @returns {AdapterBuilder} */ withEndpoint(endpoint: string): HfAdapterBuilder; + /** * This function will be called before sending the input to the Hugging Face Inference API. * It receives the input that the user has typed in the UI, and it should return the input that will be sent to the @@ -56,6 +60,7 @@ export interface HfAdapterBuilder extends AdapterBuilder { * @returns {HfAdapterBuilder} */ withInputPreProcessor(inputPreProcessor: HfInputPreProcessor): HfAdapterBuilder; + /** * The maximum number of new tokens that can be generated by the Hugging Face Inference API. * This is useful if you want to limit the number of tokens that can be generated by the API. @@ -66,16 +71,18 @@ export interface HfAdapterBuilder extends AdapterBuilder { * @returns {HfAdapterBuilder} */ withMaxNewTokens(maxNewTokens: number): HfAdapterBuilder; + /** * The model or the endpoint to use for Hugging Face Inference API. * You should provide either a model or an endpoint, but not both. * For more information, please refer to the - * [NLUX Hugging Face documentation](https://docs.nlux.ai/category/nlux-with-hugging-face). + * [nlux Hugging Face documentation](https://docs.nlux.ai/category/nlux-with-hugging-face). * * @param {string} model * @returns {AdapterBuilder} */ withModel(model: string): HfAdapterBuilder; + /** * This function will be called after receiving the output from the Hugging Face Inference API, and before * displaying it to the user. It can be used to preprocess the output before displaying it to the user. @@ -86,6 +93,7 @@ export interface HfAdapterBuilder extends AdapterBuilder { * @returns {HfAdapterBuilder} */ withOutputPreProcessor(outputPreProcessor: HfOutputPreProcessor): HfAdapterBuilder; + /** * The initial system to send to the Hugging Face Inference API. * This will be used during the pre-processing step to construct the payload that will be sent to the API. diff --git a/packages/js/langchain/src/langserve/types/adapterOptions.ts b/packages/js/langchain/src/langserve/types/adapterOptions.ts index 995a78c3..6e017736 100644 --- a/packages/js/langchain/src/langserve/types/adapterOptions.ts +++ b/packages/js/langchain/src/langserve/types/adapterOptions.ts @@ -13,7 +13,7 @@ export type LangServeAdapterOptions = { * at the end of the URL. Example: https://api.example.com/v1/my_runnable/stream * * For more information about the LangServe runnable endpoints and how to use them - * with NLUX, please visit https://docs.nlux.ai/learn/adapters/langserve + * with nlux, please visit https://docs.nlux.ai/learn/adapters/langserve * */ url: string; diff --git a/packages/js/openai/src/createAdapter.ts b/packages/js/openai/src/createAdapter.ts index b4b96dbc..064b712e 100644 --- a/packages/js/openai/src/createAdapter.ts +++ b/packages/js/openai/src/createAdapter.ts @@ -5,7 +5,7 @@ import {OpenAiAdapterBuilderImpl} from './openai/gpt/builders/builderImpl'; export const createUnsafeAdapter = (): OpenAiAdapterBuilder => { warnOnce('You just have created an OpenAI adapter that connects to the API directly from the browser. ' + 'This is not recommended for production use. We recommend that you implement a server-side proxy and configure ' - + 'a customized adapter for it. To learn more about how to create custom adapters for NLUX, visit:\n' + + 'a customized adapter for it. To learn more about how to create custom adapters for nlux, visit:\n' + 'https://nlux.dev/learn/adapters/custom-adapters'); return new OpenAiAdapterBuilderImpl(); @@ -14,7 +14,7 @@ export const createUnsafeAdapter = (): OpenAiAdapterBuilder => { export const createAdapter = (): OpenAiAdapterBuilder => { warnOnce('@nlux/openai-react -> createAdapter() is deprecated. You can either use createUnsafeAdapter() or ' + 'create a custom adapter by implementing the Adapter interface. To learn more about how to create ' - + 'custom adapters for NLUX, visit:\n' + + 'custom adapters for nlux, visit:\n' + 'https://nlux.dev/learn/adapters/custom-adapters'); return createUnsafeAdapter(); diff --git a/packages/js/openai/src/openai/gpt/adapters/adapter.ts b/packages/js/openai/src/openai/gpt/adapters/adapter.ts index 86af558b..4ef96525 100644 --- a/packages/js/openai/src/openai/gpt/adapters/adapter.ts +++ b/packages/js/openai/src/openai/gpt/adapters/adapter.ts @@ -28,11 +28,11 @@ export abstract class OpenAiAbstractAdapter imp private readonly __instanceId: string; protected constructor({ - systemMessage, - apiKey, - dataTransferMode, - model, - }: OpenAiAdapterOptions) { + systemMessage, + apiKey, + dataTransferMode, + model, + }: OpenAiAdapterOptions) { this.__instanceId = `${this.info.id}-${uid()}`; this.currentStatus = 'disconnected'; @@ -53,7 +53,7 @@ export abstract class OpenAiAbstractAdapter imp + 'https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety\n' + 'The useUnsafeAdapter/createUnsafeAdapter are only intended for development and testing purposes.\n\n' + 'For production use, we recommend that you implement a server-side proxy and configure a customized ' - + 'adapter for it. To learn more about how to create custom adapters for NLUX, visit:\n' + + 'adapter for it. To learn more about how to create custom adapters for nlux, visit:\n' + 'https://nlux.dev/learn/adapters/custom-adapters', ); } diff --git a/packages/js/openai/src/openai/gpt/builders/builder.ts b/packages/js/openai/src/openai/gpt/builders/builder.ts index ec448ff8..463f34a6 100644 --- a/packages/js/openai/src/openai/gpt/builders/builder.ts +++ b/packages/js/openai/src/openai/gpt/builders/builder.ts @@ -3,12 +3,13 @@ import {AdapterBuilder, DataTransferMode, StandardAdapter} from '@nlux/core'; export interface OpenAiAdapterBuilder extends AdapterBuilder { /** * Create a new ChatGPT API adapter. - * Adapter users don't need to call this method directly. It will be called by NLUX when the adapter is expected + * Adapter users don't need to call this method directly. It will be called by nlux when the adapter is expected * to be created. * * @returns {StandardAdapter} */ create(): StandardAdapter; + /** * The API key to use to connect to ChatGPT API. * This is secret and should not be shared publicly or hosted when deploying your application. @@ -18,9 +19,10 @@ export interface OpenAiAdapterBuilder extends AdapterBuilder { * @returns {AdapterBuilder} */ withApiKey(apiKey: string): OpenAiAdapterBuilder; + /** * Instruct the adapter to connect to API and load data either in streaming mode or in fetch mode. - * The `stream` mode would use protocols such as websockets or server-side events, and NLUX will display data as + * The `stream` mode would use protocols such as websockets or server-side events, and nlux will display data as * it's being generated by the server. The `fetch` mode would use a single request to fetch data, and the response * would only be displayed once the entire message is loaded. * @@ -29,16 +31,18 @@ export interface OpenAiAdapterBuilder extends AdapterBuilder { * @returns {AdapterBuilder} */ withDataTransferMode(mode: DataTransferMode): OpenAiAdapterBuilder; + /** * The model or the endpoint to use for ChatGPT Inference API. * You should provide either a model or an endpoint, but not both. * For more information, please refer to the - * [NLUX ChatGPT documentation](https://docs.nlux.ai/category/nlux-with-openai-face). + * [nlux ChatGPT documentation](https://docs.nlux.ai/category/nlux-with-openai-face). * * @param {string} model * @returns {AdapterBuilder} */ withModel(model: string): OpenAiAdapterBuilder; + /** * The initial system to send to ChatGPT API. * diff --git a/packages/react/openai/src/hooks/useAdapter.ts b/packages/react/openai/src/hooks/useAdapter.ts index 078a687a..4004561c 100644 --- a/packages/react/openai/src/hooks/useAdapter.ts +++ b/packages/react/openai/src/hooks/useAdapter.ts @@ -8,7 +8,7 @@ const source = 'hooks/useAdapter'; export const useUnsafeAdapter = (options: OpenAiAdapterOptions) => { warnOnce('You just have created an OpenAI adapter that connects to the API directly from the browser. ' + 'This is not recommended for production use. We recommend that you implement a server-side proxy and ' - + 'configure a customized adapter for it. To learn more about how to create custom adapters for NLUX, visit:\n' + + 'configure a customized adapter for it. To learn more about how to create custom adapters for nlux, visit:\n' + 'https://nlux.dev/learn/adapters/custom-adapters'); const [isInitialized, setIsInitialized] = useState(false); @@ -44,7 +44,7 @@ export const useUnsafeAdapter = (options: OpenAiAdapterOptions) => { export const useAdapter = (options: OpenAiAdapterOptions) => { warnOnce('@nlux/openai-react -> useAdapter() is deprecated and will be removed in future versions. ' + 'You can either call useUnsafeAdapter() or create a custom adapter by implementing the Adapter ' - + 'interface. To learn more about how to create custom adapters for NLUX, visit\n' + + 'interface. To learn more about how to create custom adapters for nlux, visit\n' + 'https://nlux.dev/learn/adapters/custom-adapters'); return useUnsafeAdapter(options); diff --git a/pipeline/contrib/README.md b/pipeline/contrib/README.md index 4d3496bc..8c1ad968 100644 --- a/pipeline/contrib/README.md +++ b/pipeline/contrib/README.md @@ -1,3 +1,3 @@ # Contributing -Resources for contributing to the NLUX project. +Resources for contributing to the nlux project. diff --git a/pipeline/npm/core/README.md b/pipeline/npm/core/README.md index 65bbfdd7..e181514e 100644 --- a/pipeline/npm/core/README.md +++ b/pipeline/npm/core/README.md @@ -1,11 +1,11 @@ -# [NLUX JS](https://nlux.ai) ๐ŸŒฒโœจ๐Ÿ’ฌ +# [nlux JS](https://nlux.ai) ๐ŸŒฒโœจ๐Ÿ’ฌ ![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-1ccb61) -[![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-fa896b)](https://nlux.dev) +[![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-fa896b)](https://nlux.dev) ## The Conversational AI UI Library For Any LLM -NLUX _(for Natural Language User Experience)_ is an open-source Javascript library that makes it super simple to +nlux _(for Natural Language User Experience)_ is an open-source Javascript library that makes it super simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM. @@ -24,27 +24,27 @@ of code, you can add conversational AI capabilities and interact with your favou ## Docs & Examples ๐Ÿ“– -* Developer portal โ€• [NLUX.dev](https://nlux.dev/) -* Examples and live code playgrounds โ€• [NLUX.dev/examples](https://nlux.dev/examples) +* Developer portal โ€• [nlux.dev](https://nlux.dev/) +* Examples and live code playgrounds โ€• [nlux.dev/examples](https://nlux.dev/examples) * [Standard LLM adapters available](https://nlux.dev/learn/adapters) -* [How to create your own adapter for NLUX](https://nlux.dev/learn/adapters/custom-adapters/create-custom-adapter) +* [How to create your own adapter for nlux](https://nlux.dev/learn/adapters/custom-adapters/create-custom-adapter) ## Vanilla JS ๐ŸŸจ vs React JS โš›๏ธ -This package `@nlux/core` is the vanilla JS version of NLUX. +This package `@nlux/core` is the vanilla JS version of nlux. If you're looking for the React JS version, please check the [`@nlux/react`](https://www.npmjs.com/package/@nlux/react) package. -## Get Started With NLUX ๐Ÿš€ +## Get Started With nlux ๐Ÿš€ -The example below demonstrates how to create an AI chat interface using NLUX JS and LangChain, the open source -framework for building LLM backends. But you can use NLUX **with any LLM** โ€• either +The example below demonstrates how to create an AI chat interface using nlux JS and LangChain, the open source +framework for building LLM backends. But you can use nlux **with any LLM** โ€• either via the [standard adapters](https://nlux.dev/learn/adapters) provided, or by creating [your own adapter](https://nlux.dev/learn/adapters/custom-adapters/create-custom-adapter). -To get started with NLUX JS and LangChain, install the `@nlux/core` and `@nlux/langchain` packages: +To get started with nlux JS and LangChain, install the `@nlux/core` and `@nlux/langchain` packages: ```sh npm install @nlux/core @nlux/langchain @@ -74,13 +74,13 @@ const aiChat = createAiChat() aiChat.mount(document.getElementById('root')); ``` -You should also [include the NLUX theme CSS file](#theme-file-and-css-) in your HTML page. +You should also [include the nlux theme CSS file](#theme-file-and-css-) in your HTML page. ## And The Result Is โœจ An AI chatbot, powered by LangChain, that can understand and respond to user messages: -[![NLUX AiChat Component](https://nlux.ai/images/demos/chat-convo-demo-fin-advisor.gif)](https://nlux.ai) +[![nlux AiChat Component](https://nlux.ai/images/demos/chat-convo-demo-fin-advisor.gif)](https://nlux.ai) ## Theme File and CSS ๐ŸŽจ diff --git a/pipeline/npm/core/package.template.json b/pipeline/npm/core/package.template.json index 3993b075..e47a32d4 100644 --- a/pipeline/npm/core/package.template.json +++ b/pipeline/npm/core/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/core", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "NLUX is Javascript and React library for building conversational AI interfaces, with support for OpenAI, Hugging Face, and more.", + "description": "nlux is Javascript and React library for building conversational AI interfaces, with support for OpenAI, Hugging Face, and more.", "repository": { "directory": "packages/js/core" }, diff --git a/pipeline/npm/hf-react/README.md b/pipeline/npm/hf-react/README.md index 637f1501..8e6dff8f 100644 --- a/pipeline/npm/hf-react/README.md +++ b/pipeline/npm/hf-react/README.md @@ -1,8 +1,8 @@ -# NLUX React Hugging Face Adapter +# nlux React Hugging Face Adapter -[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-%23fa896b)](https://nlux.dev) +[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-%23fa896b)](https://nlux.dev) -This package enables the integration between NLUX and Hugging Face, the AI models platform. +This package enables the integration between nlux and Hugging Face, the AI models platform. More specifically โ€• the package include the adapter to connect to chat models hosted and exposed via [Hugging Face Inference Endpoints](https://huggingface.co/inference-endpoints/dedicated). @@ -11,13 +11,13 @@ For more information on how to use this package, please visit: ### Vanilla JS ๐ŸŸจ vs React JS โš›๏ธ -This package `@nlux/hf-react` is meant for use with the React JS version of NLUX. +This package `@nlux/hf-react` is meant for use with the React JS version of nlux. If you're looking for the vanilla JS version, please check the [`@nlux/hf`](https://www.npmjs.com/package/@nlux/hf) package. -## About NLUX +## About nlux -NLUX _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate +nlux _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM. @@ -35,4 +35,4 @@ can add conversational AI capabilities and interact with your favourite LLM. ### Docs & Examples ๐Ÿ“– -For developer documentation, examples, and API reference โ€• you can visit: **[NLUX.ai](https://nlux.ai/)** +For developer documentation, examples, and API reference โ€• you can visit: **[nlux.ai](https://nlux.ai/)** diff --git a/pipeline/npm/hf-react/package.template.json b/pipeline/npm/hf-react/package.template.json index 0b9a6929..c50b6752 100644 --- a/pipeline/npm/hf-react/package.template.json +++ b/pipeline/npm/hf-react/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/hf-react", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "The Hugging Face adapters for NLUX React, the React JS library for building conversational AI interfaces.", + "description": "The Hugging Face adapters for nlux React, the React JS library for building conversational AI interfaces.", "repository": { "directory": "packages/react/hf" }, diff --git a/pipeline/npm/hf/README.md b/pipeline/npm/hf/README.md index a5649d2c..f7c6db3c 100644 --- a/pipeline/npm/hf/README.md +++ b/pipeline/npm/hf/README.md @@ -1,8 +1,8 @@ -# NLUX JS Hugging Face Adapter +# nlux JS Hugging Face Adapter -[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-%23fa896b)](https://nlux.dev) +[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-%23fa896b)](https://nlux.dev) -This package enables the integration between NLUX and Hugging Face, the AI models platform. +This package enables the integration between nlux and Hugging Face, the AI models platform. More specifically โ€• the package include the adapter to connect to chat models hosted and exposed via [Hugging Face Inference Endpoints](https://huggingface.co/inference-endpoints/dedicated). @@ -11,13 +11,13 @@ For more information on how to use this package, please visit: ### Vanilla JS ๐ŸŸจ vs React JS โš›๏ธ -This package `@nlux/hf` is meant for use with the vanilla JS version of NLUX. +This package `@nlux/hf` is meant for use with the vanilla JS version of nlux. If you're looking for the React JS version, please check the [`@nlux/hf-react`](https://www.npmjs.com/package/@nlux/hf-react) package. -## About NLUX +## About nlux -NLUX _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate +nlux _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM. @@ -35,4 +35,4 @@ can add conversational AI capabilities and interact with your favourite LLM. ### Docs & Examples ๐Ÿ“– -For developer documentation, examples, and API reference โ€• you can visit: **[NLUX.ai](https://nlux.ai/)** +For developer documentation, examples, and API reference โ€• you can visit: **[nlux.ai](https://nlux.ai/)** diff --git a/pipeline/npm/hf/package.template.json b/pipeline/npm/hf/package.template.json index d21a61e6..16feb685 100644 --- a/pipeline/npm/hf/package.template.json +++ b/pipeline/npm/hf/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/hf", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "The Hugging Face adapters for NLUX, the javascript library for building conversational AI interfaces.", + "description": "The Hugging Face adapters for nlux, the javascript library for building conversational AI interfaces.", "repository": { "directory": "packages/js/hf" }, diff --git a/pipeline/npm/highlighter/README.md b/pipeline/npm/highlighter/README.md index 498bb09f..aa4d2f1f 100644 --- a/pipeline/npm/highlighter/README.md +++ b/pipeline/npm/highlighter/README.md @@ -1,16 +1,16 @@ -# Syntax Highlighter Extension for [NLUX](https://nlux.ai) ๐ŸŒฒโœจ๐Ÿ’ฌ +# Syntax Highlighter Extension for [nlux](https://nlux.ai) ๐ŸŒฒโœจ๐Ÿ’ฌ -[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-%23fa896b)](https://nlux.dev) +[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-%23fa896b)](https://nlux.dev) This extension adds syntax highlighting for code displayed in -the NLUX Conversational AI interface. +the nlux Conversational AI interface. To learn more about how to use this package, please visit the [documentation](https://docs.nlux.ai/examples/syntax-highlighter) page. -## About NLUX +## About nlux -NLUX _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate +nlux _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM. @@ -28,4 +28,4 @@ can add conversational AI capabilities and interact with your favourite LLM. ### Docs & Examples ๐Ÿ“– -For developer documentation, examples, and API reference โ€• you can visit: **[NLUX.ai](https://nlux.ai/)** +For developer documentation, examples, and API reference โ€• you can visit: **[nlux.ai](https://nlux.ai/)** diff --git a/pipeline/npm/highlighter/package.template.json b/pipeline/npm/highlighter/package.template.json index 5a89f3b7..3d3a0504 100644 --- a/pipeline/npm/highlighter/package.template.json +++ b/pipeline/npm/highlighter/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/highlighter", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "Syntax highlighter for NLUX", + "description": "Syntax highlighter for nlux", "repository": { "directory": "packages/extra/highlighter" }, diff --git a/pipeline/npm/langchain-react/README.md b/pipeline/npm/langchain-react/README.md index 3d71e3ce..d1fba756 100644 --- a/pipeline/npm/langchain-react/README.md +++ b/pipeline/npm/langchain-react/README.md @@ -1,9 +1,9 @@ -# NLUX React LangChain Adapter +# nlux React LangChain Adapter -[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-%23fa896b)](https://nlux.dev) +[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-%23fa896b)](https://nlux.dev) -This package enables the integration between NLUX React and LangChain, the LLM framework. -More specifically โ€• the package include the adapter to connect **NLUX React** to backends built +This package enables the integration between nlux React and LangChain, the LLM framework. +More specifically โ€• the package include the adapter to connect **nlux React** to backends built using [LangServe](https://python.langchain.com/docs/langserve). For more information on how to use this package, please visit: @@ -11,13 +11,13 @@ For more information on how to use this package, please visit: ### Vanilla JS ๐ŸŸจ vs React JS โš›๏ธ -This package `@nlux/langchain-react` is meant for use with the React JS version of NLUX. +This package `@nlux/langchain-react` is meant for use with the React JS version of nlux. If you're looking for the vanilla JS version, please check the [`@nlux/langchain`](https://www.npmjs.com/package/@nlux/langchain) package. -## About NLUX +## About nlux -NLUX _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate +nlux _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM. @@ -35,4 +35,4 @@ can add conversational AI capabilities and interact with your favourite LLM. ### Docs & Examples ๐Ÿ“– -For developer documentation, examples, and API reference โ€• you can visit: **[NLUX.ai](https://nlux.ai/)** +For developer documentation, examples, and API reference โ€• you can visit: **[nlux.ai](https://nlux.ai/)** diff --git a/pipeline/npm/langchain-react/package.template.json b/pipeline/npm/langchain-react/package.template.json index 88004d7f..31ff58ad 100644 --- a/pipeline/npm/langchain-react/package.template.json +++ b/pipeline/npm/langchain-react/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/langchain-react", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "The LangServe adapters for NLUX React, the React JS library for building conversational AI interfaces.", + "description": "The LangServe adapters for nlux React, the React JS library for building conversational AI interfaces.", "repository": { "directory": "packages/react/langchain" }, diff --git a/pipeline/npm/langchain/README.md b/pipeline/npm/langchain/README.md index 34676fb2..4cc04466 100644 --- a/pipeline/npm/langchain/README.md +++ b/pipeline/npm/langchain/README.md @@ -1,9 +1,9 @@ -# NLUX JS LangChain Adapter +# nlux JS LangChain Adapter -[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-%23fa896b)](https://nlux.dev) +[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-%23fa896b)](https://nlux.dev) -This package enables the integration between NLUX and LangChain, the LLM framework. -More specifically โ€• the package include the adapter to connect **NLUX JS** to backends built +This package enables the integration between nlux and LangChain, the LLM framework. +More specifically โ€• the package include the adapter to connect **nlux JS** to backends built using [LangServe](https://python.langchain.com/docs/langserve). For more information on how to use this package, please visit: @@ -11,13 +11,13 @@ For more information on how to use this package, please visit: ### Vanilla JS ๐ŸŸจ vs React JS โš›๏ธ -This package `@nlux/langchain` is meant for use with the vanilla JS version of NLUX. +This package `@nlux/langchain` is meant for use with the vanilla JS version of nlux. If you're looking for the React JS version, please check the [`@nlux/langchain-react`](https://www.npmjs.com/package/@nlux/langchain-react) package. -## About NLUX +## About nlux -NLUX _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate +nlux _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM. @@ -35,4 +35,4 @@ can add conversational AI capabilities and interact with your favourite LLM. ### Docs & Examples ๐Ÿ“– -For developer documentation, examples, and API reference โ€• you can visit: **[NLUX.ai](https://nlux.ai/)** +For developer documentation, examples, and API reference โ€• you can visit: **[nlux.ai](https://nlux.ai/)** diff --git a/pipeline/npm/langchain/package.template.json b/pipeline/npm/langchain/package.template.json index f5d1fe1b..82349707 100644 --- a/pipeline/npm/langchain/package.template.json +++ b/pipeline/npm/langchain/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/langchain", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "The LangChain adapters for NLUX, the javascript library for building conversational AI interfaces.", + "description": "The LangChain adapters for nlux, the javascript library for building conversational AI interfaces.", "repository": { "directory": "packages/js/langchain" }, diff --git a/pipeline/npm/markdown/README.md b/pipeline/npm/markdown/README.md index aeb0f922..c0dd0022 100644 --- a/pipeline/npm/markdown/README.md +++ b/pipeline/npm/markdown/README.md @@ -1,11 +1,11 @@ -# Markdown Stream Parser by [NLUX](https://nlux.ai) ๐ŸŒฒโœจ๐Ÿ’ฌ +# Markdown Stream Parser by [nlux](https://nlux.ai) ๐ŸŒฒโœจ๐Ÿ’ฌ -[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-%23fa896b)](https://nlux.dev) +[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-%23fa896b)](https://nlux.dev) A lightweight JS/TS library that can be used to parse markdown streams as they are being read or generated. It can be useful for LLM-powered applications that need to parse markdown streams in real-time. -This package is part of the [NLUX](https://nlux.ai) ecosystem. +This package is part of the [nlux](https://nlux.ai) ecosystem. ## Usage diff --git a/pipeline/npm/markdown/package.template.json b/pipeline/npm/markdown/package.template.json index d2129080..13abe1ea 100644 --- a/pipeline/npm/markdown/package.template.json +++ b/pipeline/npm/markdown/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/markdown", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "A lightweight and fast markdown parser used by NLUX that can be used to parse markdown text streams into DOM.", + "description": "A lightweight and fast markdown parser used by nlux that can be used to parse markdown text streams into DOM.", "repository": { "directory": "packages/extra/markdown" }, diff --git a/pipeline/npm/openai-react/README.md b/pipeline/npm/openai-react/README.md index 2e0e626b..4bc2a5ec 100644 --- a/pipeline/npm/openai-react/README.md +++ b/pipeline/npm/openai-react/README.md @@ -1,8 +1,8 @@ -# NLUX React OpenAI Adapter +# nlux React OpenAI Adapter -[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-%23fa896b)](https://nlux.dev) +[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-%23fa896b)](https://nlux.dev) -This package enables the integration between NLUX and OpenAI's API. +This package enables the integration between nlux and OpenAI's API. More specifically โ€• the package include the adapter to connect to text generation models exposed via [OpenAI Text Generation APIs](https://platform.openai.com/docs/guides/text-generation). @@ -12,7 +12,7 @@ be used for development and testing purposes. If you would like to use OpenAI's API in a production environment, you should use the OpenAI API from a server (such us a simple Node.js proxy server that you build) and then connect to it from your web page. You can use -NLUX with any API or LLM by **creating a custom adapter for it**. +nlux with any API or LLM by **creating a custom adapter for it**. For more information on how to use this package, please visit: [https://docs.nlux.ai/api/adapters/open-ai](https://docs.nlux.ai/api/adapters/open-ai) @@ -22,13 +22,13 @@ For more information on how to create custom adapters for your own LLM or API, p ### Vanilla JS ๐ŸŸจ vs React JS โš›๏ธ -This package `@nlux/openai-react` is meant for use with the React JS version of NLUX. +This package `@nlux/openai-react` is meant for use with the React JS version of nlux. If you're looking for the vanilla JS version, please check the [`@nlux/openai`](https://www.npmjs.com/package/@nlux/openai) package. -## About NLUX +## About nlux -NLUX _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate +nlux _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM. @@ -48,4 +48,4 @@ can add conversational AI capabilities and interact with your favourite LLM. ### Docs & Examples ๐Ÿ“– -For developer documentation, examples, and API reference โ€• you can visit: **[NLUX.ai](https://nlux.ai/)** +For developer documentation, examples, and API reference โ€• you can visit: **[nlux.ai](https://nlux.ai/)** diff --git a/pipeline/npm/openai-react/package.template.json b/pipeline/npm/openai-react/package.template.json index 2c574864..4f75e788 100644 --- a/pipeline/npm/openai-react/package.template.json +++ b/pipeline/npm/openai-react/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/openai-react", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "The OpenAI adapters for NLUX React, the React JS library for building conversational AI interfaces.", + "description": "The OpenAI adapters for nlux React, the React JS library for building conversational AI interfaces.", "repository": { "directory": "packages/react/openai" }, diff --git a/pipeline/npm/openai/README.md b/pipeline/npm/openai/README.md index 9fda1623..d71a78a7 100644 --- a/pipeline/npm/openai/README.md +++ b/pipeline/npm/openai/README.md @@ -1,8 +1,8 @@ -# NLUX JS OpenAI Adapter +# nlux JS OpenAI Adapter -[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-%23fa896b)](https://nlux.dev) +[![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-%2348c342)](https://github.com/nluxai/nlux) [![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-%23fa896b)](https://nlux.dev) -This package enables the integration between NLUX and OpenAI's API. +This package enables the integration between nlux and OpenAI's API. More specifically โ€• the package include the adapter to connect to text generation models exposed via [OpenAI Text Generation APIs](https://platform.openai.com/docs/guides/text-generation). @@ -12,7 +12,7 @@ be used for development and testing purposes. If you would like to use OpenAI's API in a production environment, you should use the OpenAI API from a server (such us a simple Node.js proxy server that you build) and then connect to it from your web page. You can use -NLUX with any API or LLM by **creating a custom adapter for it**. +nlux with any API or LLM by **creating a custom adapter for it**. For more information on how to use this package, please visit: [https://docs.nlux.ai/api/adapters/open-ai](https://docs.nlux.ai/api/adapters/open-ai) @@ -22,13 +22,13 @@ For more information on how to create custom adapters for your own LLM or API, p ## Vanilla JS ๐ŸŸจ vs React JS โš›๏ธ -This package `@nlux/openai` is meant for use with the vanilla JS version of NLUX. +This package `@nlux/openai` is meant for use with the vanilla JS version of nlux. If you're looking for the React JS version, please check the [`@nlux/openai-react`](https://www.npmjs.com/package/@nlux/openai-react) package. -## About NLUX +## About nlux -NLUX _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate +nlux _(for Natural Language User Experience)_ is an open-source Javascript library that makes it simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM. @@ -48,4 +48,4 @@ can add conversational AI capabilities and interact with your favourite LLM. ### Docs & Examples ๐Ÿ“– -For developer documentation, examples, and API reference โ€• you can visit: **[NLUX.ai](https://nlux.ai/)** +For developer documentation, examples, and API reference โ€• you can visit: **[nlux.ai](https://nlux.ai/)** diff --git a/pipeline/npm/openai/package.template.json b/pipeline/npm/openai/package.template.json index 4338bb49..823258f2 100644 --- a/pipeline/npm/openai/package.template.json +++ b/pipeline/npm/openai/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/openai", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "The OpenAI adapters for NLUX, the javascript library for building conversational AI interfaces.", + "description": "The OpenAI adapters for nlux, the javascript library for building conversational AI interfaces.", "repository": { "directory": "packages/js/openai" }, diff --git a/pipeline/npm/react/README.md b/pipeline/npm/react/README.md index 04cba4c7..abe1dc02 100644 --- a/pipeline/npm/react/README.md +++ b/pipeline/npm/react/README.md @@ -1,11 +1,11 @@ -# [NLUX REACT](https://nlux.ai) ๐ŸŒฒโœจ๐Ÿ’ฌ +# [nlux REACT](https://nlux.ai) ๐ŸŒฒโœจ๐Ÿ’ฌ ![Free And Open Source](https://img.shields.io/badge/Free%20%26%20Open%20Source-1ccb61) -[![Docs NLUX.ai](https://img.shields.io/badge/Docs_Website-NLUX.dev-fa896b)](https://nlux.dev) +[![Docs nlux.ai](https://img.shields.io/badge/Docs_Website-nlux.dev-fa896b)](https://nlux.dev) ## The Conversational AI UI Library For Any LLM -NLUX _(for Natural Language User Experience)_ is an open-source React and Javascript library that makes it super simple +nlux _(for Natural Language User Experience)_ is an open-source React and Javascript library that makes it super simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website. With just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM. @@ -26,21 +26,21 @@ of code, you can add conversational AI capabilities and interact with your favou ## Docs & Examples ๐Ÿ“– -* Developer portal โ€• [NLUX.dev](https://nlux.dev/) -* Examples and live code playgrounds โ€• [NLUX.dev/examples](https://nlux.dev/examples) +* Developer portal โ€• [nlux.dev](https://nlux.dev/) +* Examples and live code playgrounds โ€• [nlux.dev/examples](https://nlux.dev/examples) * [Standard LLM adapters available](https://nlux.dev/learn/adapters) -* [How to create your own adapter for NLUX](https://nlux.dev/learn/adapters/custom-adapters/create-custom-adapter) +* [How to create your own adapter for nlux](https://nlux.dev/learn/adapters/custom-adapters/create-custom-adapter) -## Get Started With NLUX React ๐Ÿš€ +## Get Started With nlux React ๐Ÿš€ -The example below demonstrates how to create an AI chat interface using NLUX JS and LangChain, the open source -framework for building LLM backends. But you can use NLUX **with any LLM** โ€• either +The example below demonstrates how to create an AI chat interface using nlux JS and LangChain, the open source +framework for building LLM backends. But you can use nlux **with any LLM** โ€• either via the [standard adapters](https://nlux.dev/learn/adapters) provided, or by creating [your own adapter](https://nlux.dev/learn/adapters/custom-adapters/create-custom-adapter). -To get started with NLUX JS and LangChain, install the `@nlux/react` and `@nlux/langchain-react` packages: +To get started with nlux JS and LangChain, install the `@nlux/react` and `@nlux/langchain-react` packages: ```sh npm install @nlux/react @nlux/langchain-react @@ -72,14 +72,14 @@ const App = () => { } ``` -You should also [include the NLUX theme CSS file](#theme-file-and-css-) in your HTML page +You should also [include the nlux theme CSS file](#theme-file-and-css-) in your HTML page or import it in your React app. ## And The Result Is โœจ An AI chatbot, powered by LangChain, that can understand and respond to user messages: -[![NLUX AiChat Component](https://nlux.ai/images/demos/chat-convo-demo-fin-advisor.gif)](https://nlux.ai) +[![nlux AiChat Component](https://nlux.ai/images/demos/chat-convo-demo-fin-advisor.gif)](https://nlux.ai) ## Theme File and CSS ๐ŸŽจ diff --git a/pipeline/npm/react/package.template.json b/pipeline/npm/react/package.template.json index ea200c60..920ff2aa 100644 --- a/pipeline/npm/react/package.template.json +++ b/pipeline/npm/react/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/react", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "NLUX React is a library for building conversational AI interfaces, with support for OpenAI, HuggingFace, and more.", + "description": "nlux React is a library for building conversational AI interfaces, with support for OpenAI, HuggingFace, and more.", "repository": { "directory": "packages/react/core" }, diff --git a/pipeline/npm/themes/package.template.json b/pipeline/npm/themes/package.template.json index 5ae4f71d..97c3fefd 100644 --- a/pipeline/npm/themes/package.template.json +++ b/pipeline/npm/themes/package.template.json @@ -2,7 +2,7 @@ "name": "@nlux/themes", "version": "{versions.nlux}", "license": "MPL-2.0", - "description": "Themes and CSS files for NLUX, the Javascript and React library for building conversational AI interfaces.", + "description": "Themes and CSS files for nlux, the Javascript and React library for building conversational AI interfaces.", "repository": { "directory": "packages/css/themes" }, diff --git a/pipeline/scripts/dev.mjs b/pipeline/scripts/dev.mjs index 21a6f549..b1559c32 100644 --- a/pipeline/scripts/dev.mjs +++ b/pipeline/scripts/dev.mjs @@ -76,7 +76,7 @@ try { info('Sym-linking packages to emulator folder'); // - // Symlink built NLUX packages to emulator folder + // Symlink built nlux packages to emulator folder // await Promise.all(packagesList.map(async (pkg) => { await symlinkDir( diff --git a/pipeline/scripts/set.mjs b/pipeline/scripts/set.mjs index 287eab18..48b3dbe8 100644 --- a/pipeline/scripts/set.mjs +++ b/pipeline/scripts/set.mjs @@ -24,8 +24,6 @@ try { await copyStructure('dev'); await copyStructure('prod'); - nl(1); - info('Applying versions โฒ๏ธ to source code packages:'); applyDevVersion('packages/js'); applyDevVersion('packages/extra'); diff --git a/pipeline/scripts/version.mjs b/pipeline/scripts/version.mjs index 0df292a5..c1c36a56 100644 --- a/pipeline/scripts/version.mjs +++ b/pipeline/scripts/version.mjs @@ -38,7 +38,7 @@ const readVersionsFile = () => { } info('Versions file read successfully! โœ… ' + versionsPath); - info('NLUX version ๐ŸŒŸ : ' + result.nlux); + info('nlux version ๐ŸŒŸ : ' + result.nlux); info('PeerDependencies versions: '); rawLog(JSON.stringify(result.peerDependencies)); rawLog(JSON.stringify(result.dependencies)); diff --git a/pipeline/utils/log.mjs b/pipeline/utils/log.mjs index db8c8dcc..e06142b0 100644 --- a/pipeline/utils/log.mjs +++ b/pipeline/utils/log.mjs @@ -1,5 +1,5 @@ export const info = (message, ...args) => { - console.log('[NLUX Pipeline]', message, ...args); + console.log('[nlux]', message, ...args); }; export const nl = (howMany = 1) => { @@ -7,16 +7,16 @@ export const nl = (howMany = 1) => { }; export const error = (message, ...args) => { - console.error('[NLUX Pipeline]', message, ...args); + console.error('[nlux]', message, ...args); }; export const warn = (message, ...args) => { - console.warn('[NLUX Pipeline]', message, ...args); + console.warn('[nlux]', message, ...args); } export const throwError = (message, ...args) => { error(message, ...args); - throw new Error(`[NLUX Pipeline] ${message} ${args.join(' ')}`); + throw new Error(`[nlux] ${message} ${args.join(' ')}`); }; export const rawLog = (message, ...args) => { diff --git a/pipeline/utils/rollup/replaceImportedModules.ts b/pipeline/utils/rollup/replaceImportedModules.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/samples/emulator/package.json b/samples/emulator/package.json index ad07c754..68734497 100644 --- a/samples/emulator/package.json +++ b/samples/emulator/package.json @@ -1,6 +1,6 @@ { "name": "@nlux-dev/emulator", - "description": "Emulator and vanilla JS samples of a real use-case of NLUX to test the library", + "description": "Emulator and vanilla JS samples of a real use-case of nlux to test the library", "version": "0.0.0-latest", "author": "Salmen Hichri", "license": "MPL-2.0", diff --git a/samples/emulator/src/01-vanilla-js-with-adapters/index.html b/samples/emulator/src/01-vanilla-js-with-adapters/index.html index c934a90f..ba57377a 100644 --- a/samples/emulator/src/01-vanilla-js-with-adapters/index.html +++ b/samples/emulator/src/01-vanilla-js-with-adapters/index.html @@ -4,7 +4,7 @@ - NLUX JS Demo! + nlux JS Demo! diff --git a/samples/emulator/src/02-vanilla-js-with-events/index.html b/samples/emulator/src/02-vanilla-js-with-events/index.html index c934a90f..ba57377a 100644 --- a/samples/emulator/src/02-vanilla-js-with-events/index.html +++ b/samples/emulator/src/02-vanilla-js-with-events/index.html @@ -4,7 +4,7 @@ - NLUX JS Demo! + nlux JS Demo! diff --git a/samples/emulator/src/03-react-js-with-hugging-face/index.html b/samples/emulator/src/03-react-js-with-hugging-face/index.html index 794a1308..1a8afc5c 100644 --- a/samples/emulator/src/03-react-js-with-hugging-face/index.html +++ b/samples/emulator/src/03-react-js-with-hugging-face/index.html @@ -4,7 +4,7 @@ - NLUX React Demo! + nlux React Demo! diff --git a/samples/emulator/src/04-react-js-with-langserve/adapters/einbotFetch.ts b/samples/emulator/src/04-react-js-with-langserve/adapters/einbotFetch.ts index 23743111..e684afe9 100644 --- a/samples/emulator/src/04-react-js-with-langserve/adapters/einbotFetch.ts +++ b/samples/emulator/src/04-react-js-with-langserve/adapters/einbotFetch.ts @@ -1,6 +1,6 @@ import {Adapter} from '@nlux/react'; -// A demo endpoint by NLUX that connects that uses LangServe to connect to OpenAI. +// A demo endpoint by nlux that connects that uses LangServe to connect to OpenAI. const demoLangServerEndpoint = 'https://pynlux.api.nlux.ai/einbot/invoke'; const promptToBody = (message: string) => { diff --git a/samples/emulator/src/04-react-js-with-langserve/adapters/einbotStream.ts b/samples/emulator/src/04-react-js-with-langserve/adapters/einbotStream.ts index 94d4cf24..3d23af53 100644 --- a/samples/emulator/src/04-react-js-with-langserve/adapters/einbotStream.ts +++ b/samples/emulator/src/04-react-js-with-langserve/adapters/einbotStream.ts @@ -1,6 +1,6 @@ import {Adapter, StreamingAdapterObserver} from '@nlux/react'; -// A demo endpoint by NLUX that connects that uses LangServe to connect to OpenAI. +// A demo endpoint by nlux that connects that uses LangServe to connect to OpenAI. const demoProxyServerUrl = 'https://pynlux.api.nlux.ai/einbot/stream'; const promptToBody = (message: string) => { diff --git a/samples/emulator/src/04-react-js-with-langserve/index.html b/samples/emulator/src/04-react-js-with-langserve/index.html index 2e92e6da..ca9a7c0f 100644 --- a/samples/emulator/src/04-react-js-with-langserve/index.html +++ b/samples/emulator/src/04-react-js-with-langserve/index.html @@ -4,7 +4,7 @@ - NLUX React Demo! + nlux React Demo! diff --git a/samples/emulator/src/05-react-js-with-adapters/index.html b/samples/emulator/src/05-react-js-with-adapters/index.html index ec599ee9..7b31c35a 100644 --- a/samples/emulator/src/05-react-js-with-adapters/index.html +++ b/samples/emulator/src/05-react-js-with-adapters/index.html @@ -4,7 +4,7 @@ - NLUX React Demo! + nlux React Demo! diff --git a/samples/emulator/src/06-react-js-personas/index.html b/samples/emulator/src/06-react-js-personas/index.html index 60da71d1..7a97f93d 100644 --- a/samples/emulator/src/06-react-js-personas/index.html +++ b/samples/emulator/src/06-react-js-personas/index.html @@ -4,7 +4,7 @@ - NLUX FinFunBot Persona! + nlux FinFunBot Persona! diff --git a/samples/emulator/src/07-react-js-events/index.html b/samples/emulator/src/07-react-js-events/index.html index 60da71d1..7a97f93d 100644 --- a/samples/emulator/src/07-react-js-events/index.html +++ b/samples/emulator/src/07-react-js-events/index.html @@ -4,7 +4,7 @@ - NLUX FinFunBot Persona! + nlux FinFunBot Persona! diff --git a/samples/emulator/src/08-react-js-with-conv-history/index.html b/samples/emulator/src/08-react-js-with-conv-history/index.html index 2e92e6da..ca9a7c0f 100644 --- a/samples/emulator/src/08-react-js-with-conv-history/index.html +++ b/samples/emulator/src/08-react-js-with-conv-history/index.html @@ -4,7 +4,7 @@ - NLUX React Demo! + nlux React Demo! diff --git a/samples/emulator/src/index.html b/samples/emulator/src/index.html index 7c77c86b..c642d611 100644 --- a/samples/emulator/src/index.html +++ b/samples/emulator/src/index.html @@ -4,7 +4,7 @@ - NLUX Demo! + nlux Demo!