RASA API Service

PHOTO EMBED

Fri Jun 23 2023 09:37:27 GMT+0000 (Coordinated Universal Time)

Saved by @cameron_v_r #rasa #typescript

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Injectable({
  providedIn: 'root',
})
export class MessageService {
  constructor(private http: HttpClient) {}

  sendMessage(message: string) {
    return this.http.post('http://localhost:5005/webhooks/rest/webhook', { message: message });
  }
}
content_copyCOPY