Skip to content

Commit da48e83

Browse files
committed
Refactor PerplexityService by renaming queryPerplexityAI method to createChatCompletion for clarity and consistency. Update method calls accordingly. Ensure all user-facing text is internationalized.
1 parent 8115a3e commit da48e83

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/src/services/perplexity.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export class PerplexityService {
9898
/**
9999
* Queries the Perplexity AI API
100100
*/
101-
async queryPerplexityAI(
101+
async createChatCompletion(
102102
messages: PerplexityMessage[],
103103
options?: {
104104
model?: string;
@@ -159,7 +159,7 @@ export class PerplexityService {
159159
{ role: 'user', content: userPrompt },
160160
];
161161

162-
const response = await this.queryPerplexityAI(messages);
162+
const response = await this.createChatCompletion(messages);
163163
return response.choices[0].message.content.trim();
164164
}
165165

@@ -200,7 +200,7 @@ export class PerplexityService {
200200
];
201201

202202
try {
203-
const response = await this.queryPerplexityAI(messages, {
203+
const response = await this.createChatCompletion(messages, {
204204
temperature: 0.3, // Lower temperature for more accurate/factual responses
205205
maxTokens: 4000, // Ensure there's enough space for the full corrected analysis
206206
});

0 commit comments

Comments
 (0)