<commit_before>import {Injectable} from "@angular/core";
import {Http} from "@angular/http";
import {Observable} from "rxjs/Observable";
import {BaseService} from "./base-service";
import {Status} from "../classes/status";
import {Message} from "../classes/message";
import {RetrieveMessages} from "../classes/retrieveMessages";

@Injectable()
export class ChatService extends BaseService {
	constructor(protected http: Http) {
		super(http);
	}

	private messageUrl = "api/messages/";

	chat(message : Message) : Observable<Status> {
		return(this.http.post(this.messageUrl, message)
			.map(this.extractMessage)
			.catch(this.handleError));
	}

	getChat() : Observable<RetrieveMessages[]> {
		return(this.http.post(this.messageUrl, "getMessages")
			.map(this.extractData)
			.catch(this.handleError));
	}
}<commit_msg>Went back to get<commit_after>import {Injectable} from "@angular/core";
import {Http} from "@angular/http";
import {Observable} from "rxjs/Observable";
import {BaseService} from "./base-service";
import {Status} from "../classes/status";
import {Message} from "../classes/message";
import {RetrieveMessages} from "../classes/retrieveMessages";

@Injectable()
export class ChatService extends BaseService {
	constructor(protected http: Http) {
		super(http);
	}

	private messageUrl = "api/messages/";

	chat(message : Message) : Observable<Status> {
		return(this.http.post(this.messageUrl, message)
			.map(this.extractMessage)
			.catch(this.handleError));
	}

	getChat() : Observable<RetrieveMessages[]> {
		return(this.http.get(this.messageUrl)
			.map(this.extractData)
			.catch(this.handleError));
	}
}
{'fraction_non_alphanumeric': 0.15757204169221337, 'fraction_numerical': 0.0, 'mean_word_length': 5.301158301158301, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2946501', 'n_tokens_mistral': 531, 'n_tokens_neox': 505, 'n_words': 110}