@appland/appmap 3.142.1 → 3.143.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/built/docs/get-started-with-appmap/navie-ai-quickstart.md +1 -5
- package/built/docs/guides/index.md +0 -1
- package/built/docs/navie/bring-your-own-model.md +64 -141
- package/built/docs/navie/how-to-open-navie.md +1 -1
- package/built/docs/navie/index.md +1 -0
- package/built/docs/{guides/navie-best-practices.md → navie/using-navie.md} +47 -16
- package/built/docs/reference/analysis-rules.md +1 -1
- package/built/docs/reference/appmap-client-cli.md +1 -1
- package/built/docs/reference/appmap-gradle-plugin.md +1 -1
- package/built/docs/reference/appmap-java.md +1 -1
- package/built/docs/reference/appmap-maven-plugin.md +1 -1
- package/built/docs/reference/appmap-node.md +1 -1
- package/built/docs/reference/appmap-python.md +18 -2
- package/built/docs/reference/appmap-ruby.md +1 -1
- package/built/docs/reference/github-action.md +1 -1
- package/built/docs/reference/index.md +1 -0
- package/built/docs/reference/license-key-install.md +1 -1
- package/built/docs/reference/navie.md +261 -0
- package/built/docs/reference/remote-recording-api.md +1 -1
- package/built/docs/reference/uninstalling-appmap.md +1 -1
- package/built/html/appmap.js.map +2 -2
- package/built/html/sequenceDiagram.js.map +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - Reference
|
|
4
|
+
description: "Reference Guide to AppMap Navie, including advanced usage and configuration"
|
|
5
|
+
toc: true
|
|
6
|
+
reference: true
|
|
7
|
+
name: AppMap Navie AI
|
|
8
|
+
step: 3
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# AppMap Navie AI
|
|
12
|
+
- [Advanced Navie Commands](#advanced-navie-commands)
|
|
13
|
+
- [`@explain`](#explain)
|
|
14
|
+
- [`@help`](#help)
|
|
15
|
+
- [`@generate`](#generate)
|
|
16
|
+
- [Bring Your Own Model Examples](#bring-your-own-model-examples)
|
|
17
|
+
- [OpenAI](#openai)
|
|
18
|
+
- [Azure OpenAI](#azure-openai)
|
|
19
|
+
- [AnyScale Endpoints](#anyscale-endpoints)
|
|
20
|
+
- [Ollama](#ollama)
|
|
21
|
+
- [LM Studio](#lm-studio)
|
|
22
|
+
- [OpenAI Key Management in VS Code](#openai-key-management-in-vs-code)
|
|
23
|
+
- [Add a new OpenAI Key in VS Code](#add-a-new-openai-key-in-vs-code)
|
|
24
|
+
- [Delete a configured OpenAI Key](#delete-a-configured-openai-key)
|
|
25
|
+
- [How is my API key saved securely?](#how-is-my-api-key-saved-securely)
|
|
26
|
+
- [OpenAI Key Management in JetBrains](#openai-key-management-in-jetbrains)
|
|
27
|
+
- [Adding or Modifying OpenAI API Key in JetBrains](#adding-or-modifying-openai-api-key-in-jetbrains)
|
|
28
|
+
- [How is my API key saved securely?](#how-is-my-api-key-saved-securely-1)
|
|
29
|
+
- [Accessing Navie Logs](#accessing-navie-logs)
|
|
30
|
+
- [In VS Code](#in-vs-code)
|
|
31
|
+
- [In JetBrains](#in-jetbrains)
|
|
32
|
+
- [GitHub Repository](#github-repository)
|
|
33
|
+
|
|
34
|
+
## Advanced Navie Commands
|
|
35
|
+
|
|
36
|
+
You can ask free-form questions, or start your question with one of these commands:
|
|
37
|
+
|
|
38
|
+
- [`@explain`](#explain)
|
|
39
|
+
- [`@help`](#help)
|
|
40
|
+
- [`@generate`](#generate)
|
|
41
|
+
|
|
42
|
+
### `@explain`
|
|
43
|
+
|
|
44
|
+
The `@explain` command prefix within Navie serves as a default option focused on helping you learn more about your project. Using the `@explain` prefix will focus the Navie AI response to be more explanatory and will dive into architectural level questions across your entire code base. You can also use this to ask for ways to improve the performance of a feature as well.
|
|
45
|
+
|
|
46
|
+
#### Examples <!-- omit in toc -->
|
|
47
|
+
|
|
48
|
+
- @explain how does user authentication work in this project?
|
|
49
|
+
- @explain how is the export request for physical flows handled, and what are the tables involved?
|
|
50
|
+
- @explain how does the products listing page works and how can I improve the performance?
|
|
51
|
+
|
|
52
|
+
### `@help`
|
|
53
|
+
|
|
54
|
+
Navie will help you setup AppMap, including generating AppMap recordings and diagrams. This prefix will focus the Navie AI response to be more specific towards help with using AppMap products and features. This will leverage the [AppMap documentation](https://appmap.io/docs) as part of the context related to your question and provide guidance for using AppMap features or diving into advanced AppMap topics.
|
|
55
|
+
|
|
56
|
+
#### Examples <!-- omit in toc -->
|
|
57
|
+
|
|
58
|
+
- @help how do I setup process recording for my node.js project?
|
|
59
|
+
- @help how can I reduce the size of my large AppMap Data recordings?
|
|
60
|
+
- @help how can i export my AppMap data to atlassian confluence?
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### `@generate`
|
|
64
|
+
|
|
65
|
+
The `@generate` prefix will focus the Navie AI response to optimize for new code creation. This is useful when you want the Navie AI to respond with code implementations across your entire code base. This is useful for both creation of new code as well as creation of test cases.
|
|
66
|
+
|
|
67
|
+
#### Examples <!-- omit in toc -->
|
|
68
|
+
|
|
69
|
+
- @generate Using the django-simple-captcha library add the necessary code for an offline captcha to my new user registration page.
|
|
70
|
+
- @generate Update the function for the physical flow export to include data type via physical_spec_data_type and physical_specification tables without changing the existing functionality.
|
|
71
|
+
- @generate Design and implement a cache key for user posts and show me how to implement it within this code base
|
|
72
|
+
|
|
73
|
+
## Bring Your Own Model Examples
|
|
74
|
+
|
|
75
|
+
### OpenAI
|
|
76
|
+
|
|
77
|
+
**Note:** We recommend configuring your OpenAI key using the code editor extension. Follow the [Bring Your Own Key](/docs/navie/bring-your-own-model.html#configuring-your-openai-key) docs for instructions.
|
|
78
|
+
|
|
79
|
+
Only `OPENAI_API_KEY` needs to be set, other settings can stay default:
|
|
80
|
+
|
|
81
|
+
| `OPENAI_API_KEY`| `sk-9spQsnE3X7myFHnjgNKKgIcGAdaIG78I3HZB4DFDWQGM` |
|
|
82
|
+
|
|
83
|
+
When using your own OpenAI API key, you can also modify the OpenAI model for Navie to use. For example if you wanted to use `gpt-3.5` or use an preview model like `gpt-4-vision-preview`.
|
|
84
|
+
|
|
85
|
+
| `APPMAP_NAVIE_MODEL`| `gpt-4-vision-preview` |
|
|
86
|
+
|
|
87
|
+
### Azure OpenAI
|
|
88
|
+
|
|
89
|
+
Assuming you [created](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource) a `navie` GPT-4 deployment on `contoso.openai.azure.com` OpenAI instance:
|
|
90
|
+
|
|
91
|
+
| `AZURE_OPENAI_API_KEY` | `e50edc22e83f01802893d654c4268c4f` |
|
|
92
|
+
| `AZURE_OPENAI_API_VERSION` | `2024-02-01` |
|
|
93
|
+
| `AZURE_OPENAI_API_INSTANCE_NAME` | `contoso` |
|
|
94
|
+
| `AZURE_OPENAI_API_DEPLOYMENT_NAME` | `navie` |
|
|
95
|
+
|
|
96
|
+
### AnyScale Endpoints
|
|
97
|
+
|
|
98
|
+
[AnyScale Endpoints](https://www.anyscale.com/endpoints) allows querying a
|
|
99
|
+
selection of open-source LLMs. After you create an account you can use it by
|
|
100
|
+
setting:
|
|
101
|
+
|
|
102
|
+
| `OPENAI_API_KEY` | `esecret_myxfwgl1iinbz9q5hkexemk8f4xhcou8` |
|
|
103
|
+
| `OPENAI_BASE_URL` | `https://api.endpoints.anyscale.com/v1` |
|
|
104
|
+
| `APPMAP_NAVIE_MODEL` | `mistralai/Mixtral-8x7B-Instruct-v0.1` |
|
|
105
|
+
|
|
106
|
+
Consult [AnyScale documentation](https://docs.endpoints.anyscale.com/) for model
|
|
107
|
+
names. Note we recommend using Mixtral models with Navie.
|
|
108
|
+
|
|
109
|
+
### Ollama
|
|
110
|
+
|
|
111
|
+
You can use [Ollama](https://ollama.com/) to run Navie with local models; after
|
|
112
|
+
you've successfully ran a model with `ollama run` command, you can configure
|
|
113
|
+
Navie to use it:
|
|
114
|
+
|
|
115
|
+
| `OPENAI_API_KEY` | `dummy` |
|
|
116
|
+
| `OPENAI_BASE_URL` | `http://127.0.0.1:11434/v1` |
|
|
117
|
+
| `APPMAP_NAVIE_MODEL` | `mixtral` |
|
|
118
|
+
|
|
119
|
+
**Note:** Even though it's running locally a dummy placeholder API key is still required.
|
|
120
|
+
|
|
121
|
+
### LM Studio
|
|
122
|
+
|
|
123
|
+
You can use [LM Studio](https://lmstudio.ai/) to run Navie with local models.
|
|
124
|
+
|
|
125
|
+
After downloading a model to run, select the option to run a local server.
|
|
126
|
+
|
|
127
|
+
<img class="video-screenshot" src="/assets/img/product/lmstudio-run-local-server.webp"/>
|
|
128
|
+
|
|
129
|
+
In the next window, select which model you want to load into the local inference server.
|
|
130
|
+
|
|
131
|
+
<img class="video-screenshot" src="/assets/img/product/lmstudio-load-model.webp"/>
|
|
132
|
+
|
|
133
|
+
After loading your model, you can confirm it's successfully running in the logs.
|
|
134
|
+
|
|
135
|
+
*NOTE*: Save the URL it's running under to use for `OPENAI_BASE_URL` environment variable.
|
|
136
|
+
|
|
137
|
+
For example: `http://localhost:1234/v1`
|
|
138
|
+
|
|
139
|
+
<img class="video-screenshot" src="/assets/img/product/lmstudio-confirm-running.webp"/>
|
|
140
|
+
|
|
141
|
+
In the `Model Inspector` copy the name of the model and use this for the `APPMAP_NAVIE_MODEL` environment variable.
|
|
142
|
+
|
|
143
|
+
For example: `Meta-Llama-3-8B-Instruct-imatrix`
|
|
144
|
+
|
|
145
|
+
<img class="video-screenshot" src="/assets/img/product/lmstudio-model-inspector.webp"/>
|
|
146
|
+
|
|
147
|
+
Continue to configure your local environment with the following environment variables based on your LM Studio configuration. Refer to the [documentation above](#bring-your-own-model-byom) for steps specific to your code editor.
|
|
148
|
+
|
|
149
|
+
| `OPENAI_API_KEY` | `dummy` |
|
|
150
|
+
| `OPENAI_BASE_URL` | `http://localhost:1234/v1` |
|
|
151
|
+
| `APPMAP_NAVIE_MODEL` | `Meta-Llama-3-8B-Instruct-imatrix` |
|
|
152
|
+
|
|
153
|
+
**Note:** Even though it's running locally a dummy placeholder API key is still required.
|
|
154
|
+
|
|
155
|
+
## OpenAI Key Management in VS Code
|
|
156
|
+
|
|
157
|
+
### Add a new OpenAI Key in VS Code
|
|
158
|
+
|
|
159
|
+
The standard way to add an OpenAI API key in VS Code is to use the `gear` icon in the Navie chat window, but you can alternatively set the key using the VS Code Command Palette with an `AppMap` command option.
|
|
160
|
+
|
|
161
|
+
In VS Code, open the Command Palette.
|
|
162
|
+
|
|
163
|
+
You can use a hotkey to open the VS Code Command Palette
|
|
164
|
+
- Mac: `Cmd + Shift + P`
|
|
165
|
+
- Windows/Linux: `Ctrl + Shift + P`
|
|
166
|
+
|
|
167
|
+
Or you can select `View` -> `Command Palette`
|
|
168
|
+
|
|
169
|
+
<img class="video-screenshot" src="/assets/img/product/byok-command-palette.webp"/>
|
|
170
|
+
|
|
171
|
+
Search for `AppMap Set OpenAPI Key`
|
|
172
|
+
|
|
173
|
+
<img class="video-screenshot" src="/assets/img/product/byok-search.webp"/>
|
|
174
|
+
|
|
175
|
+
Paste your key into the new field and hit enter.
|
|
176
|
+
|
|
177
|
+
You'll get a notification in VS Code that your key is set.
|
|
178
|
+
|
|
179
|
+
**NOTE:** You will need to reload your window for the setting to take effect. Use the Command Palette `Developer: Reload Window`
|
|
180
|
+
|
|
181
|
+
<img class="video-screenshot" src="/assets/img/product/byok-key-set.webp"/>
|
|
182
|
+
|
|
183
|
+
### Delete a configured OpenAI Key
|
|
184
|
+
|
|
185
|
+
To delete your key, simply open the Command Palette
|
|
186
|
+
|
|
187
|
+
You can use a hotkey to open
|
|
188
|
+
- Mac: `Cmd + Shift + P`
|
|
189
|
+
- Windows/Linux: `Ctrl + Shift + P`
|
|
190
|
+
|
|
191
|
+
Or you can select `View` -> `Command Palette`
|
|
192
|
+
|
|
193
|
+
<img class="video-screenshot" src="/assets/img/product/byok-command-palette.webp"/>
|
|
194
|
+
|
|
195
|
+
Search for `AppMap Set OpenAPI Key`
|
|
196
|
+
|
|
197
|
+
<img class="video-screenshot" src="/assets/img/product/byok-search.webp"/>
|
|
198
|
+
|
|
199
|
+
And simply hit enter with the field blank. VS Code will notify you that the key has been unset.
|
|
200
|
+
|
|
201
|
+
**NOTE:** You will need to reload your window for the setting to take effect. Use the Command Palette `Developer: Reload Window`
|
|
202
|
+
|
|
203
|
+
<img class="video-screenshot" src="/assets/img/product/byok-key-erased.webp"/>
|
|
204
|
+
|
|
205
|
+
### How is my API key saved securely?
|
|
206
|
+
|
|
207
|
+
For secure storage of API key secrets within AppMap, we use the default VS Code secret storage which leverages Electron's safeStorage API to ensure the confidentiality of sensitive information. Upon encryption, secrets are stored within the user data directory in a SQLite database, alongside other VS Code state information. This encryption process involves generating a unique encryption key, which, on macOS, is securely stored within `Keychain Access` under "Code Safe Storage" or "Code - Insiders Safe Storage," depending on the version. This method provides a robust layer of protection, preventing unauthorized access by other applications or users with full disk access. The safeStorage API, accessible in the main process, supports operations such as checking encryption availability, encrypting and decrypting strings, and selecting storage backends on Linux. This approach ensures that your secrets are securely encrypted and stored, safeguarding them from potential threats while maintaining application integrity.
|
|
208
|
+
|
|
209
|
+
## OpenAI Key Management in JetBrains
|
|
210
|
+
|
|
211
|
+
The standard way to add an OpenAI API key in JetBrains is to use the `gear` icon in the Navie chat window, but you can alternatively set the key directly in the JetBrains settings.
|
|
212
|
+
|
|
213
|
+
### Adding or Modifying OpenAI API Key in JetBrains
|
|
214
|
+
|
|
215
|
+
In JetBrains, open the `Settings` option.
|
|
216
|
+
|
|
217
|
+

|
|
218
|
+
|
|
219
|
+
In the `Settings` window, search for `appmap` in the search bar on the side. Under the `Tools -> AppMap` you will see a configuration option for your OpenAI API Key in the `AppMap Services` section. This is the same section you are able to add/edit/modify your other environment settings for using your own custom models.
|
|
220
|
+
|
|
221
|
+

|
|
222
|
+
|
|
223
|
+
### How is my API key saved securely?
|
|
224
|
+
|
|
225
|
+
AppMap follows JetBrains best practices for the storing of sensitive data. The AppMap JetBrains plugin uses the `PasswordSafe` package [to securely persist](https://www.jetbrains.com/help/idea/reference-ide-settings-password-safe.html) your OpenAI API key. The default storage format for `PasswordSafe` is operating system dependent. Refer to the [JetBrains Developer Documents](https://plugins.jetbrains.com/docs/intellij/persisting-sensitive-data.html#storage) for more information.
|
|
226
|
+
|
|
227
|
+
## Accessing Navie Logs
|
|
228
|
+
|
|
229
|
+
### In VS Code
|
|
230
|
+
|
|
231
|
+
You can access the Navie logs in VS Code by opening the `Output` tab and selecting `AppMap Services` from the list of available output logs.
|
|
232
|
+
|
|
233
|
+
To open the Output window, on the menu bar, choose View > Output, or in Windows press `Ctrl+Shift+U` or in Mac use `Shift+Command+U`
|
|
234
|
+
|
|
235
|
+

|
|
236
|
+
|
|
237
|
+
Click on the output log dropdown in the right corner to view a list of all the available output logs.
|
|
238
|
+
|
|
239
|
+

|
|
240
|
+
|
|
241
|
+
Select on the `AppMap: Services` log to view the logs from Navie.
|
|
242
|
+
|
|
243
|
+

|
|
244
|
+
|
|
245
|
+
### In JetBrains
|
|
246
|
+
|
|
247
|
+
You can enable debug logging of Navie in your JetBrains code editor by first opening `Help` > `Diagnostic Tools` > `Debug Log Settings`.
|
|
248
|
+
|
|
249
|
+

|
|
250
|
+
|
|
251
|
+
In the `Custom Debug Log Configuration` enter `appland` to enable DEBUG level logging for the AppMap plugin.
|
|
252
|
+
|
|
253
|
+

|
|
254
|
+
|
|
255
|
+
Next, open `Help` > `Show Log...` will open the IDE log file.
|
|
256
|
+
|
|
257
|
+

|
|
258
|
+
|
|
259
|
+
## GitHub Repository
|
|
260
|
+
|
|
261
|
+
[https://github.com/getappmap/appmap](https://github.com/getappmap/appmap)
|