include the users platform

This commit is contained in:
Paul Gauthier 2024-07-05 17:03:26 -03:00
parent 81ccf72317
commit 143e05ec66
2 changed files with 11 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import hashlib
import json import json
import mimetypes import mimetypes
import os import os
import platform
import re import re
import sys import sys
import threading import threading
@ -732,7 +733,15 @@ class Coder:
def fmt_system_prompt(self, prompt): def fmt_system_prompt(self, prompt):
lazy_prompt = self.gpt_prompts.lazy_prompt if self.main_model.lazy else "" lazy_prompt = self.gpt_prompts.lazy_prompt if self.main_model.lazy else ""
prompt = prompt.format(fence=self.fence, lazy_prompt=lazy_prompt) platform_text = (
f"The user's system is `{platform.platform()}` according to python platform.platform()"
)
prompt = prompt.format(
fence=self.fence,
lazy_prompt=lazy_prompt,
platform=platform_text,
)
return prompt return prompt
def format_messages(self): def format_messages(self):

View file

@ -25,6 +25,7 @@ Don't suggest a solution that isn't supported.
Be helpful but concise. Be helpful but concise.
Unless the question indicates otherwise, assume the user wants to use aider as a CLI tool. Unless the question indicates otherwise, assume the user wants to use aider as a CLI tool.
{platform}
""" """
example_messages = [] example_messages = []