npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dxpllm-quote

v1.0.0

Published

Web app that provides quotes in an LLM-driven conversational interface.

Downloads

8

Readme

Introduction

Welcome to DXP LLM enabled Quote API service. There are two node projects in this solution.

  1. Backend API for Quote AI Service (dxpllm-quote)
  2. A development UI for testing and demo purposes (ui)

Getting Started

Installing Backend Dependencies

Use node version 18.xx.xx or higher.

In the root, run npm install -g vsts-npm-auth. In your root directory, create a .npmrc file. Paste the below lines into it.

@dxpllm:registry=https://geico.pkgs.visualstudio.com/40a5e92a-a7a7-4355-a86e-8e606f618850/_packaging/DXPLLM/npm/registry/
@gdk:registry=https://geico.pkgs.visualstudio.com/5c20fde4-e106-42a6-8eaf-b911a05f9552/_packaging/DigitalExperience/npm/registry/
registry=https://registry.npmjs.org/

Then, run the command vsts-npm-auth -config .npmrc to authenticate to GEICO's feeds. After that command completes, you can run npm install in the root directory to install the dependencies for the API.

Installing Dependencies

Make sure npm version is latest and then in the root folder, run npm install, there should already be a .npmrc file in that folder which points to the correct registry. Note:For the first time users npm install will ask user input to proceed , enter y or use silent install npm install --yes. This is required step as we have npx npm-force-resolutions as a preinstall script to force certain versions of nested dependencies to be installed for scan vulnerabilities.

Build and Test

Test To facilitate testing, it's recommended to use the Jest extenstion in VSCode. To run tests, run the command jest in the project root.

Build and Run

To build the project, run the command npm run build-tsoa in the root directory, in the VSCode Git Bash terminal. To clean and rebuild, run npm run clean and then npm run build.

To start just the backend server, use the command npm start. To start both the backend and the Development Interface simulataneously, you can run npm run full. This will run the front end interface proxied to the backend for testing.

The backend and UI run on localhost:3002 and localhost:3000, respectively.

Steps to Run Docker To run docker first obtain a token for access and encode it in base64, go to the page (https://geico.visualstudio.com/Omnichannel%20Platform/_artifacts/feed/DXPLLM/connect) , Select npm feed [instructions] Click on link 'instructions for using a Personal Access Token to authenticate' and follow steps Then run the following command to build the docker image

docker build . -f Dockerfile --build-arg NPM_TOKEN=<token> --build-arg USER_ID=<ADOUserId> -t geiconp.azurecr.io/dxpllm/dllqte/quote-svc:latest

example:

docker build . -f Dockerfile --build-arg NPM_TOKEN=yOur....bAse64== --build-arg USER_ID=userId --build-arg NPM_AUTH_FILE=.npmrc-dxpllm-pat -t geiconp.azurecr.io/dxpllm/dllqte/dxpllmquotesvc

Update your GEICO_HTTPSCERT_PATH env variable for self signed cert file path to point to docker container path GEICO_HTTPSCERT_PATH=/usr/local/share/ca-certificates/dxpllmqtelocal.geico.net.pfx.txt

Then run the following command which will create a new Docker container named quote-svc, loads environment variables , adds a custom host entry, and uses the specified image from the Container Registry. The container will run the latest version of the quote-svc image.

To run docker container over https on port 8443:

docker run --name quote-svc --env-file .env -p 8443:8443 geiconp.azurecr.io/dxpllm/dllqte/dxpllmquotesvc

You can access the service with a self signed certificate over https using a host url. map dxpllmqtelocal.geico.net in your windows host file to 127.0.0.1. the host file path in Windows is C:\Windows\System32\drivers\etc then you can access core llm service via [https] using the host dxpllmqtelocal.geico.net name '(https://dxpllmqtelocal.geico.net:8443/apidoc/swagger/)

To run on local container and browse the app

docker run --name quote-svc --env-file .env -p 3002:3002 geiconp.azurecr.io/dxpllm/dllqte/dxpllmquotesvc

To run the local redis

docker pull redis
docker run --name my-redis -p 6379:6379 -d redis