diff --git a/installer/client/cli/context.md b/installer/client/cli/context.md index d18dc68..4a7052a 100644 --- a/installer/client/cli/context.md +++ b/installer/client/cli/context.md @@ -1,3 +1,3 @@ # Context -The user should place a context here +please give all responses in spanish diff --git a/installer/client/cli/fabric.py b/installer/client/cli/fabric.py index f2a24b3..bdeba6e 100755 --- a/installer/client/cli/fabric.py +++ b/installer/client/cli/fabric.py @@ -14,7 +14,7 @@ def main(): ) parser.add_argument("--text", "-t", help="Text to extract summary from") parser.add_argument( - "--copy", "-c", help="Copy the response to the clipboard", action="store_true" + "--copy", "-C", help="Copy the response to the clipboard", action="store_true" ) parser.add_argument( "--output", @@ -45,7 +45,7 @@ def main(): parser.add_argument( "--listmodels", help="List all available models", action="store_true" ) - parser.add_argument('--context', '-C', + parser.add_argument('--context', '-c', help="Use Context file (context.md) to add context to your pattern", action="store_true") args = parser.parse_args() diff --git a/installer/client/cli/utils.py b/installer/client/cli/utils.py index 3379e8c..f3ccf00 100644 --- a/installer/client/cli/utils.py +++ b/installer/client/cli/utils.py @@ -80,7 +80,11 @@ class Standalone: print("pattern not found") return else: - messages = [user_message] + if context: + user_message += {role: "system", content: context} + messages = [user_message] + else: + messages = [user_message] try: stream = self.client.chat.completions.create( model=self.model, @@ -142,7 +146,11 @@ class Standalone: print("pattern not found") return else: - messages = [user_message] + if context: + user_message += {'role': 'system', 'content': context} + messages = [user_message] + else: + messages = [user_message] try: response = self.client.chat.completions.create( model=self.model,