fix(server): filter out attachment in pplx provider (#11986)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Bug Fixes**
  - Improved handling of messages without attachments, ensuring a placeholder is shown when content is empty and attachments are omitted.
- **New Features**
  - Added the ability to selectively include or exclude attachments in message processing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
darkskygit
2025-04-25 09:50:32 +00:00
parent 4887e1d612
commit dc7bbddce1
2 changed files with 27 additions and 20 deletions
@@ -82,7 +82,7 @@ export class PerplexityProvider
try {
metrics.ai.counter('chat_text_calls').add(1, { model });
const [system, msgs] = await chatToGPTMessage(messages);
const [system, msgs] = await chatToGPTMessage(messages, false);
const modelInstance = this.#instance(model);
@@ -119,7 +119,7 @@ export class PerplexityProvider
try {
metrics.ai.counter('chat_text_stream_calls').add(1, { model });
const [system, msgs] = await chatToGPTMessage(messages);
const [system, msgs] = await chatToGPTMessage(messages, false);
const modelInstance = this.#instance(model);