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: docs/src/2.prompt/README.md
+17-12Lines changed: 17 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -569,39 +569,44 @@ class A main
569
569
570
570
### Testing
571
571
572
-
Testing is a prompt engineering technique that involves providing a test case for a given code snippet or function. This technique is useful for developers who want to test their code or for those who want to ensure the correctness of their code.
572
+
You can ask a LLM to provide a test case for a given code snippet or function:
573
+
574
+
`Generate unit tests for the following function using [test framework] in [programming language]`
573
575
574
576
### System design and architecture
575
577
576
-
System design and architecture is a prompt engineering technique that involves providing a system design or architecture for a given code snippet or function. This technique is useful for developers who want to design their code or for those who want to understand the overall architecture of their projects.
578
+
Architecture Diagrams can be generated from text prompts using tools like Mermaid.js integrated with LLMs:
577
579
578
580
<divstyle="padding:56.25%000;position:relative;"><iframesrc="https://player.vimeo.com/video/1120819061?h=c364063439&badge=0&autopause=0&player_id=0&app_id=58479"frameborder="0"allow="autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media; web-share"referrerpolicy="strict-origin-when-cross-origin"style="position:absolute;top:0;left:0;width:100%;height:100%;"title="How to use mermaid with librechat for creating diagrams ?"></iframe></div>
579
581
580
582
### Documentation generation
581
583
582
-
Documentation generation is a prompt engineering technique that involves providing a documentation for a given code snippet or function. This technique is useful for developers who want to document their code or for those who want to provide documentation for their projects. It can be used to generate documentation in various formats such as Markdown, HTML, or PDF.
584
+
LLM, in particular when combined with RAG and Agentic AI techniques, can be used to generate documentation for various codes, from snippets to entire projects. This documentation can be generated in various formats such as Markdown, HTML, or PDF.
583
585
584
-
### Commit Message Generation
586
+
`Generate a README.md file for installing and using the following project, based on the commands found in the linked `pom.xml` file`
585
587
586
-
Commit message generation is a prompt engineering technique that involves providing a commit message for a given code snippet or function. This technique is useful for developers who want to generate commit messages for their code or for those who want to ensure that their commit messages are clear and concise.
588
+
`Analyze the API endpoints in `api` folder and generate API documentation in Markdown format`
587
589
588
590
### Vulnerability checking
589
591
590
-
Vulnerability checking is a prompt engineering technique that involves providing a vulnerability check for a given code snippet or function. This technique is useful for developers who want to check for vulnerabilities in their code or for those who want to ensure that their code is secure.
592
+
`Analyze the following code for potential security vulnerabilities and suggest improvements`
591
593
592
594
::: warning
593
-
This prompt is not recommended for production use. It is intended for testing and debugging purposes only and is not a proof of security or safety of your app.
595
+
This is not recommended for production use. It is intended for testing and debugging purposes only and is not a proof of security or safety of your app.
594
596
:::
595
597
596
598
### Shell/CLI commands manual
597
599
598
600
As a developer, you’re not limited to only writing code. LLMs can assist with CLI such as shell commands and version control using Git.
599
601
602
+
`Move all .txt files from the current directory to a folder named 'docs'`
603
+
604
+
`Create a new Git branch named 'feature-x' and switch to it`
605
+
600
606
### Regular expression explanation
601
607
602
-
You can understand complex regular expressions and generate ones that match specific patterns in text. This technique is useful for developers who want to write complex regular expressions or for those who want to understand the syntax of regular expressions.
608
+
Ask LLM to help you understand complex regular expressions or generate ones that match specific patterns in text.
603
609
604
-
```
605
-
Explain this regular expression in JavaScript: const regex =
Copy file name to clipboardExpand all lines: docs/src/3.client/README.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,7 +235,6 @@ You can use the APIs to generate responses from the models. To enable the API se
235
235
2024-11-15 18:45:22 [INFO] [LM STUDIO SERVER] Supported endpoints:
236
236
2024-11-15 18:45:22 [INFO] [LM STUDIO SERVER] -> GET http://localhost:1234/v1/models
237
237
2024-11-15 18:45:22 [INFO] [LM STUDIO SERVER] -> POST http://localhost:1234/v1/chat/completions
238
-
2024-11-15 18:45:22 [INFO] [LM STUDIO SERVER] -> POST http://localhost:1234/v1/completions
239
238
2024-11-15 18:45:22 [INFO] [LM STUDIO SERVER] -> POST http://localhost:1234/v1/embeddings
240
239
2024-11-15 18:45:22 [INFO]
241
240
2024-11-15 18:45:22 [INFO] [LM STUDIO SERVER] Logs are saved into /Users/ibrahim/.cache/lm-studio/server-logs
@@ -247,7 +246,6 @@ You can use the endpoints to generate responses from the models. The endpoints a
247
246
248
247
-`GET /v1/models`: This endpoint returns a list of the available models.
249
248
-`POST /v1/chat/completions`: This endpoint generates responses from the models using the chat format.Chat format is used for tasks such as chatbots, conversational AI, and language learning.
250
-
-`POST /v1/completions`: This endpoint generates responses from the models using the completion format. Completion format is used for tasks such as question answering, summarization, and text generation.
251
249
-`POST /v1/embeddings`: This endpoint generates embeddings from the models. Embeddings are used for tasks such as sentiment analysis, text classification, and language translation.
Copy file name to clipboardExpand all lines: docs/src/5.services/README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,14 +77,16 @@ OpenAI provides a set of standard endpoints for interacting with their LLMs. Thi
77
77
|**Retrieve Model**<br>Get details of a specific model | GET `/v1/models/{model}`|`Authorization: Bearer {api_key}`| — |`{ "id": "gpt-4", "object": "model", "owned_by": "openai", "permission": [...], "created": 1234567890 }`|
[`Structured Outputs`](https://platform.openai.com/docs/guides/structured-outputs) is a feature that ensures the model will always generate responses that adhere to your supplied [JSON Schema](https://platform.openai.com/docs/api-reference/chat/create#chat_create-response_format), so you don't need to worry about the model omitting a required key, or hallucinating an invalid enum value.
0 commit comments