You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/main/java/io/github/jeddict/ai/JeddictChatModel.java
+32-43
Original file line number
Diff line number
Diff line change
@@ -390,31 +390,22 @@ public List<Snippet> suggestNextLineCode(String classDatas, String classContent,
390
390
+ "Based on the provided Java source file content, suggest relevant code to be added at the placeholder location ${SUGGEST_CODE_LIST}. "
391
391
+ "Suggest additional classes, interfaces, enums, or other top-level constructs. "
392
392
+ "Ensure that the suggestions fit the context of the entire file. "
393
-
+ "Return a JSON array with a few best suggestions without any additional text or explanation. Each element should be an object containing two fields: 'imports' and 'snippet'. "
394
-
+ "'imports' should be an array of required Java import statements (if no imports are required, return an empty array). "
395
-
+ "'snippet' should contain the suggested code as a text block, which may include multiple lines formatted as a single string using \\n for line breaks. \n\n"
396
-
+ "Make sure to escape any double quotes within the snippet using a backslash (\\) so that the JSON remains valid. \n\n"
prompt = "You are an API server that suggests Java code for the outermost context of a Java source file, outside of any existing class. "
400
397
+ "Based on the provided Java source file content, suggest relevant code to be added at the placeholder location ${SUGGEST_CODE_LIST}. "
401
398
+ "Suggest package declarations, import statements, comments, or annotations for public class. "
402
399
+ "Ensure that the suggestions fit the context of the entire file. "
403
-
+ "Return a JSON array with a few best suggestions without any additional text or explanation. Each element should be an object containing two fields: 'imports' and 'snippet'. "
404
-
+ "'imports' should be an array of required Java import statements (if no imports are required, return an empty array). "
405
-
+ "'snippet' should contain the suggested code as a text block, which may include multiple lines formatted as a single string using \\n for line breaks. \n\n"
406
-
+ "Make sure to escape any double quotes within the snippet using a backslash (\\) so that the JSON remains valid. \n\n"
prompt = "You are an API server that suggests Java code modifications for a class. "
412
406
+ "At the placeholder location ${SUGGEST_CODE_LIST}, suggest either a class-level modifier such as 'public', 'protected', 'private', 'abstract', 'final', or a relevant class-level annotation. "
413
407
+ "Ensure that the suggestions are appropriate for the class context provided. "
414
-
+ "Return a JSON array with a few best suggestions without any additional text or explanation. Each element should be an object containing two fields: 'imports' and 'snippet'. "
415
-
+ "'imports' should be an array of required Java import statements (if no imports are required, return an empty array). "
416
-
+ "'snippet' should contain the suggested code as a text block, which may include multiple lines formatted as a single string using \\n for line breaks. \n\n"
417
-
+ "Make sure to escape any double quotes within the snippet using a backslash (\\) so that the JSON remains valid. \n\n"
@@ -423,52 +414,37 @@ public List<Snippet> suggestNextLineCode(String classDatas, String classContent,
423
414
+ "At the placeholder location ${SUGGEST_CODE_LIST}, suggest method-level modifiers such as 'public', 'protected', 'private', 'abstract', 'static', 'final', 'synchronized', or relevant method-level annotations. "
424
415
+ "Additionally, you may suggest method-specific annotations like '@Override', '@Deprecated', '@Transactional', etc. "
425
416
+ "Ensure that the suggestions are appropriate for the method context provided. "
426
-
+ "Return a JSON array with a few best suggestions without any additional text or explanation. Each element should be an object containing two fields: 'imports' and 'snippet'. "
427
-
+ "'imports' should be an array of required Java import statements (if no imports are required, return an empty array). "
428
-
+ "'snippet' should contain the suggested code as a text block, which may include multiple lines formatted as a single string using \\n for line breaks. \n\n"
429
-
+ "Make sure to escape any double quotes within the snippet using a backslash (\\) so that the JSON remains valid. \n\n"
prompt = "You are an API server that suggests Java code for an inner class at the placeholder location ${SUGGEST_CODE_LIST}. "
435
423
+ "Based on the provided Java class content, suggest either relevant inner class modifiers such as 'public', 'private', 'protected', 'static', 'abstract', 'final', or a full inner class definition. "
436
424
+ "Additionally, you may suggest class-level annotations for the inner class. Ensure that the suggestions are contextually appropriate for an inner class. "
437
-
+ "Return a JSON array with a few best suggestions without any additional text or explanation. Each element should be an object containing two fields: 'imports' and 'snippet'. "
438
-
+ "'imports' should be an array of required Java import statements (if no imports are required, return an empty array). "
439
-
+ "'snippet' should contain the suggested code as a text block, which may include multiple lines formatted as a single string using \\n for line breaks. \n\n"
440
-
+ "Make sure to escape any double quotes within the snippet using a backslash (\\) so that the JSON remains valid. \n\n"
prompt = "You are an API server that suggests Java code for an class at the placeholder location ${SUGGEST_CODE_LIST}. "
446
431
+ "Based on the provided Java class content, suggest either relevant class level members, attributes, constants, methods or blocks. "
447
432
+ "Ensure that the suggestions are contextually appropriate for an class. "
448
-
+ "Return a JSON array with a few best suggestions without any additional text or explanation. Each element should be an object containing two fields: 'imports' and 'snippet'. "
449
-
+ "'imports' should be an array of required Java import statements (if no imports are required, return an empty array). "
450
-
+ "'snippet' should contain the suggested code as a text block, which may include multiple lines formatted as a single string using \\n for line breaks. \n\n"
451
-
+ "Make sure to escape any double quotes within the snippet using a backslash (\\) so that the JSON remains valid. \n\n"
prompt = "You are an API server that suggests Java code to enhance an if-statement. "
457
439
+ "At the placeholder location ${SUGGEST_IF_CONDITIONS}, suggest additional conditional checks or actions within the if-statement. "
458
440
+ "Ensure that the suggestions are contextually appropriate for the condition. "
459
-
+ "Return a JSON array with a few best suggestions without any additional text or explanation. Each element should be an object containing two fields: 'imports' and 'snippet'. "
460
-
+ "'imports' should be an array of required Java import statements (if no imports are required, return an empty array). "
461
-
+ "'snippet' should contain the suggested code as a text block, which may include multiple lines formatted as a single string using \\n for line breaks. \n\n"
462
-
+ "Make sure to escape any double quotes within the snippet using a backslash (\\) so that the JSON remains valid. \n\n"
prompt = "You are an API server that suggests Java code for a specific context in a given Java class at the placeholder location ${SUGGEST_CODE_LIST}. "
466
445
+ "Based on the provided Java class content and the line of code: \"" + lineText + "\", suggest a relevant single line of code or a multi-line code block as appropriate for the context represented by the placeholder ${SUGGEST_CODE_LIST} in the Java class. "
467
446
+ "Ensure that the suggestions are relevant to the context. "
468
-
+ "Return a JSON array with few best suggestions without any additional text or explanation where each element is an object containing two fields: 'imports' and 'snippet'. "
469
-
+ "'imports' should be an array of required Java import statements for the suggested code (if no imports are required, return an empty array). "
470
-
+ "'snippet' should contain the suggested code as text block, which may include multiple lines formatted as a single string using \\n for line breaks. \n\n"
471
-
+ "Make sure to escape any double quotes within the snippet using a backslash (\\) so that the JSON remains valid. \n\n"
Stringprompt = "You are an API server that suggests Java annotations for a specific context in a given Java class at the placeholder location ${SUGGEST_ANNOTATION_LIST}. "
516
-
+ "Based on the provided Java class content and the line of code: \"" + lineText + "\", suggest relevant annotations that can be applied at the placeholder location represented by ${SUGGEST_ANNOTATION_LIST} in the Java Class. "
517
-
+ "Return a JSON array with a few best suggestions without any additional text or explanation. Each element should be an object containing two fields: 'imports' and 'snippet'. "
490
+
StringjsonRequest = "Return a JSON array with a few best suggestions without any additional text or explanation. Each element should be an object containing two fields: 'imports' and 'snippet'. "
518
491
+ "'imports' should be an array of required Java import statements (if no imports are required, return an empty array). "
519
492
+ "'snippet' should contain the suggested code as a text block, which may include multiple lines formatted as a single string using \\n for line breaks. "
520
-
+ "Make sure to escape any double quotes within the snippet using a backslash (\\) so that the JSON remains valid. \n\n"
521
-
+ "Ensure that the suggestions are appropriate for the given Java Class Content:\n\n" + classContent;
493
+
+ "Make sure to escape any double quotes within the snippet using a backslash (\\) so that the JSON remains valid. \n\n";
494
+
495
+
496
+
StringjsonRequestWithDescription = "Return a JSON array with a few best suggestions without any additional text or explanation. Each element should be an object containing three fields: 'imports', 'snippet', and 'description'. "
497
+
+ "'imports' should be an array of required Java import statements (if no imports are required, return an empty array). "
498
+
+ "'snippet' should contain the suggested code as a text block, which may include multiple lines formatted as a single string using \\n for line breaks. "
499
+
+ "'description' should be a very short explanation of what the snippet does and why it might be appropriate in this context, formatted with <b>, <\br> and optionally if required then include any imporant link with <a href=''> tags. "
500
+
+ "Make sure to escape any double quotes within the snippet and description using a backslash (\\) so that the JSON remains valid. \n\n";
Stringprompt = "You are an API server that suggests Java annotations for a specific context in a given Java class at the placeholder location ${SUGGEST_ANNOTATION_LIST}. "
504
+
+ "Based on the provided Java class content and the line of code: \"" + lineText + "\", suggest relevant annotations that can be applied at the placeholder location represented by ${SUGGEST_ANNOTATION_LIST} in the Java Class. "
AIAssistancePanel.gptModelComboBox.toolTipText=Choose the GPT model for AI assistance. Different models may offer varied levels of complexity and speed.
17
16
AIAssistancePanel.aiAssistantActivationCheckBox.toolTipText=Enable or disable the AI assistant for smart code completion and suggestions.
18
17
AIAssistancePanel.enableHintCheckBox.toolTipText=Enable this option to receive hints and suggestions as you work.
19
-
AIAssistancePanel.enableSmartCodeCheckBox.toolTipText=Enable AI-powered smart code suggestions for improved development experience.
20
18
AIAssistancePanel.resetKeyButton.toolTipText=Click to reset the API key for AI assistant integration.
19
+
AIAssistancePanel.enableSmartCodeCheckBox.toolTipText=Enable AI-powered smart code suggestions for improved development experience.
0 commit comments