🕵️ SicherheitslückenCVE-2024-33668 | Zammad up to 6.2.x Upload Cache excessive authentication(17.09.2026 um 02:15 Uhr)
🕵️ SicherheitslückenCVE-2024-33668 | Zammad up to 6.2.x Upload Cache excessive authentication(17.09.2026 um 02:15 Uhr)
🔧 Programmierung 🕛 vor 2 Jahren 10 Min Lesezeit
0

Generating replies using Huggingface interference and Mistrial in NestJS

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




Introduction



In this blog post, I demonstrated generating replies with Huggingface Inference and Mistral 7B model. Buyers can provide ratings and comments on sales transactions in auction sites such as eBay. When the feedback is negative, the seller must reply promptly to resolve the dispute. This demo aims to generate responses in the same language as the buyer according to the tone (positive, neutral, or negative) and topics. Chatbot and user engaged in multi-turn conversations to obtain the language, sentiment, and topics of the feedback. Finally, the model generates the final reply to keep customers happy.






Generate Huggingface Token



Log in to your Huggingface account at .



In cURL




CODE
curl --location 'http://localhost:3003/esg-advisory-feedback' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Looking ahead, the needs of our customers will increasingly be defined by sustainable choices. ESG reporting through diginex has brought us uniformity, transparency and direction. It provides us with a framework to be able to demonstrate to all stakeholders - customers, employees, and investors - what we are doing and to be open and transparent."
}'










Dockerize the application






CODE
// .dockerignore

.git
.gitignore
node_modules/
dist/
Dockerfile
.dockerignore
npm-debug.log






Create a .dockerignore file for Docker to ignore some files and directories.




CODE
// Dockerfile

# Use an official Node.js runtime as the base image
FROM node:20-alpine

# Set the working directory in the container
WORKDIR /app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install the dependencies
RUN npm install

# Copy the rest of the application code to the working directory
COPY . .

# Expose a port (if your application listens on a specific port)
EXPOSE 3003

# Define the command to run your application
CMD [ "npm", "run", "start:dev"]






I added the Dockerfile that installed the dependencies, built the NestJS application, and started it at port 3003.




CODE
// docker-compose.yaml

version: '3.8'

services:
backend:
build:
context: .
dockerfile: Dockerfile
environment:
- PORT=${PORT}
- HUGGINGFACE_API_KEY=${HUGGINGFACE_API_KEY}
- HUGGINGFACE_MODEL=${HUGGINGFACE_MODEL}
ports:
- "${PORT}:${PORT}"
networks:
- ai
restart: unless-stopped
networks:
ai:






I added the docker-compose.yaml in the current folder, which was responsible for creating the NestJS application container.






Launch the Docker application






CODE
docker-compose up






Navigate to

  • Huggingface JS:

  • Vollständiger Original-Artikel
    Den kompletten Beitrag mit allen Details direkt auf dev.to lesen.
    ↗ Original-Artikel auf dev.to lesen
    Wie bewertest du diesen Beitrag?
    1 Klick Feedback
    Teilen mit Netzwerk & Team:

    Community-Analysen & Experten-Meinungen 0

    Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
    Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
    Community Pulse: Relevanz-Einschätzung
    1 Klick Experten-Votum
    🔴 Akute Relevanz 0%
    🟡 In Evaluierung 0%
    🟢 Keine Auswirkung 0%
    Spannende Innovation 0%
    Verwandte Story-Cluster & Quellen (Vektor-KI)
    Port 8095 Engine
    3 Quellen
    CVE-2020-20212 | MikroTik RouterOS 6.44.5 /nova/bin/console null pointer dereference
    2 Quellen
    CVE-2017-17537 | MikroTik RouterBOARD 6.39.2/6.40.5 TCP Service 53 input validation (EDB-43200 / ID 860320)
    2 Quellen
    CVE-2023-27169 | Xpand IT Write-Back Manager 2.3.1 hash predictable salt (EUVD-2023-30949)
    Ähnliche Beiträge
    🔍 Verwandte News

    Auch interessante Nachrichten Generating replies using Huggingface interference and Mistrial in NestJS

    Thematisch verwandte Begriffe: Generating, replies, using, Huggingface · 6 Treffer

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...