This commit is contained in:
Saifeddine ALOUI 2023-08-20 22:21:46 +02:00
parent 8601cad45f
commit 83120321ea
4 changed files with 4 additions and 5 deletions

View File

@ -16,6 +16,5 @@
"Translate yaml file": "Instruction: Translate the comments and values of the yaml file from english to French.\nSession 1:\n```yaml language=english\n# This is a comment\nparameter_1: this is parameter 1\nparameter_2: this is parameter 2\nparameter_3: 25\nparameter_4: |\n This is a multi\n line parameter\n```\n```yaml language=french\n# Ceci est un commentaire\nparameter_1: ceci est le param\u00e8tre 1\nparameter_2: ceci est le param\u00e8tre 2\nparameter_3: 25\nparameter_4: |\n Ceci est une multiligne\n ligne de param\u00e8tre\n```\nSession 2:\n```yaml language=english\n@<Put your yaml data here>@\n```\n```yaml language=french",
"Translate json file": "Instruction: Translate the values of the json file from english to French.\nSession 1:\n```json language=english\n{\n\"parameter_1\": \"this is parameter 1\",\n\"parameter_2\": \"this is parameter 2\",\n\"parameter_3\": 25,\n\"parameter_4\": \"This is a multi\\nline string\",\n}\n```\nAfter translation, we get:\n```json language=french\n{\n\"parameter_1\": \"ceci est le param\u00e8tre 1\",\n\"parameter_2\": \"ceci est le param\u00e8tre 2\",\n\"parameter_3\": 25,\n\"parameter_4\": \"Ceci est une cha\u00eene de caract\u00e8res multiligne\\n\",\n}\n```\nSession 2:\n```json language=english\n@<Put your json data here>@\n```\n```json language=french\n",
"Translate python strings": "Instruction: Translate the strings inside this python code.\nSession 1:\n```python language=english\na = input(\"a:\")\nprint(f\"you have input the value {a}\")\n```\nAfter translation, we get:\n```python language=fr\na = input(\"a:\")\nprint(f\"vous avez entr\u00e9 la valeur {a}\")\n```\nSession 2:\n```python language=@<source language example: english>@\n@<Put your python code here>@\n```\n```python language=@<source language example: french>@\n@<Remove this placeholder and place the cursor in here then press Generate Text>@\n```\n",
"Generic translator": "```@<put your source language name here. example english>@\n@<Put your english text here>@\n```\n```@<put your destination language name here. example french>@\n@<Remove this block and place the cursor here to make the AI generate the translation>@\n```\n",
"lollms-video-description-template": "# lollms-video-description-template\n```bullet-points\n- lollms (lord of large language model) is a tool to use llms for text generation. It supports local AIs like llama and llama2 based models as well as remote text generation models.\n- lollms-playground is a module that allows the user to play around in an easy way with text generation. it features presets that allow conditionning of the generation\n- This is a youtube video about the use of the preset called Make full python code that helps the user make a full python code.\n- Extra information about the channel:\nFollow me on social media:\nyoutube: ParisNeo\ngithub: ParisNeo\nX (twitter): @SpaceNerduino\nDiscord channel: https://discord.gg/pcw62UMW\n\nProject path: https://github.com/ParisNeo/lollms-webui\n```\n```Youtube-script\nHi there. Today I'm going to show you how to use the lollms playground to make, debug, execute and document python code.\nLet's go.\nFirst, open the playground and look for the preset called \"Make full python code\". \nPress the validation button to put the preset content into the main input text area.\nNow you need to update the elements delimited by @< and >@. \nWe set the project title, the author and a description of the project.\nHere we will create a code that uses matplotlib to show a sine wave.\nNow press the generate text button to start generating the text.\nThe AI generates a code that can be tested using the button execute. If there is a bug, just correct it and regenerate.\nNow you can execute the code.\nIt works as expected.\nFinally, we can document the code we have just made. Just use the documentation text in the preset and run the generation.\nAs you can see, the AI gave a good README.md file that I can use on my github page.\nBe aware that the quality of the output depends on the model you are using. Make sure you use a good model for coding. You can checkout the models leaderboard on hugging face.\nI hope you liked this.\nDon't forget to like and subscribe.\nSee ya\n```\nFind a clickbate title\nVideo Title: How to make full python code with an AI - lollms-playground tutorial\nDescription: Learn how to use the awesome tool lollms-playground to make, debug, execute and document python code using only your voice. Just describe what you want to do and let the AI does it for you!"
"Generic translator": "```@<put your source language name here. example english>@\n@<Put your english text here>@\n```\n```@<put your destination language name here. example french>@\n@<Remove this block and place the cursor here to make the AI generate the translation>@\n```\n"
}

File diff suppressed because one or more lines are too long

2
web/dist/index.html vendored
View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-39a9feaf.js"></script>
<script type="module" crossorigin src="/assets/index-8de594d6.js"></script>
<link rel="stylesheet" href="/assets/index-90cbdba9.css">
</head>
<body>

View File

@ -117,7 +117,7 @@ export default {
mounted() {
const text_element = document.getElementById('text_element');
text_element.addEventListener('input', () => {
this.cursorPosition = text_element.selectionStart;
this.cursorPosition = text_element.selectionStart+1;
});
text_element.addEventListener('click', () => {
this.cursorPosition = text_element.selectionStart;