Skip to content

Commit

Permalink
Passing in username as user_id
Browse files Browse the repository at this point in the history
  • Loading branch information
polterguy committed Aug 26, 2023
1 parent fbc3cf5 commit 2f5a3b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/app/_general/services/openai.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Injectable } from '@angular/core';
import { HttpService } from 'src/app/_general/services/http.service';
import { MagicResponse } from '../models/magic-response.model';
import { PromptResponse } from '../models/prompt-response.model';
import { BackendService } from './backend.service';

/**
* OpenAI model.
Expand All @@ -29,7 +30,9 @@ export class OpenAIModel {
})
export class OpenAIService {

constructor(private httpService: HttpService) { }
constructor(
private httpService: HttpService,
private backendService: BackendService) { }

/**
* Queries OpenAI with the specified prompt and returns result to caller.
Expand All @@ -44,6 +47,7 @@ export class OpenAIService {
if (session) {
query += '&session=' + encodeURIComponent(session)
}
query += '&user_id=' + encodeURIComponent(this.backendService.active.username);
return this.httpService.get<PromptResponse>(query);
}

Expand Down

0 comments on commit 2f5a3b2

Please sign in to comment.