Plusieurs gros ajouts :
Some checks failed
Build & Push Images / build (brain) (push) Has been cancelled
Build & Push Images / build (core) (push) Has been cancelled
Build & Push Images / build (web) (push) Has been cancelled
Build & Push Images / build-switcher (push) Has been cancelled

- Possibilité de discuter avec un PDF ; RAG ou analyse approfondie. Enlèvement de l'autre outil PDF de discussion qui analysait d'abord un PDF en proposant directement une intégration sans attendre qu'on pose de question
- Mise en place de l'import directement dans les outils dans la sidebar
- Mise en place d'un outil pour créer des tables aléatoires avec possibilité d'utiliser pendant la partie
- Mise en place d'un outil pour mettre en place des PNJ, scènes, chapitre.... directement à partir de la discussion avec le PDF
- Mise en place RAG avec mistal-embeding ou nomic si on utilise ollama
- Mise en place mistral, google en fournisseurs alternatifs pour l'IA dans le cloud
- version 0.11.0-bêta
This commit is contained in:
2026-06-07 09:52:15 +02:00
parent 5eb15dc449
commit edc4434298
113 changed files with 6347 additions and 662 deletions

View File

@@ -0,0 +1,49 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { RandomTable, RandomTableCreate } from './random-table.model';
/**
* CRUD des tables aléatoires (campagne). Mirroir de NpcService.
*/
@Injectable({ providedIn: 'root' })
export class RandomTableService {
private apiUrl = '/api/random-tables';
constructor(private http: HttpClient) {}
getByCampaign(campaignId: string): Observable<RandomTable[]> {
return this.http.get<RandomTable[]>(`${this.apiUrl}/campaign/${campaignId}`);
}
getById(id: string): Observable<RandomTable> {
return this.http.get<RandomTable>(`${this.apiUrl}/${id}`);
}
create(payload: RandomTableCreate): Observable<RandomTable> {
return this.http.post<RandomTable>(this.apiUrl, payload);
}
update(id: string, payload: RandomTable): Observable<RandomTable> {
return this.http.put<RandomTable>(`${this.apiUrl}/${id}`, payload);
}
delete(id: string): Observable<void> {
return this.http.delete<void>(`${this.apiUrl}/${id}`);
}
/** Génère une PROPOSITION de table via l'IA (non persistée) à préremplir dans le formulaire. */
generate(campaignId: string, description: string, diceFormula: string): Observable<RandomTable> {
return this.http.post<RandomTable>(`${this.apiUrl}/generate`, { campaignId, description, diceFormula });
}
/** Improvisation IA d'un court récit sur un résultat tiré (en partie). */
improvise(
campaignId: string, tableName: string, resultLabel: string, resultDetail: string
): Observable<{ narration: string }> {
return this.http.post<{ narration: string }>(
`${this.apiUrl}/improvise`,
{ campaignId, tableName, resultLabel, resultDetail }
);
}
}