Commit 2d8c127
committed
Add custom endpoint option for OpenAI-like APIs
Fixes #5
Add support for custom endpoint for OpenAI-like APIs.
* **Config Interface**: Add `customEndpoint` field to `Config` interface in `src/config.ts`.
* **getModels Function**: Update `getModels` function in `src/config.ts` to support custom endpoints.
* **showConfigUI Function**: Update `showConfigUI` function in `src/config.ts` to allow users to set a custom endpoint.
* **createOpenAI Function**: Modify `createOpenAI` function in `src/run.ts` to use the custom endpoint if provided.
* **Documentation**: Add documentation for custom endpoint option in `README.md`.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/m7medVision/lazycommit/issues/5?shareId=XXXX-XXXX-XXXX-XXXX).1 parent 5cf464a commit 2d8c127
3 files changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
160 | 166 | | |
161 | 167 | | |
162 | 168 | | |
| |||
235 | 241 | | |
236 | 242 | | |
237 | 243 | | |
| 244 | + | |
238 | 245 | | |
239 | 246 | | |
240 | 247 | | |
241 | 248 | | |
242 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
243 | 257 | | |
244 | 258 | | |
245 | 259 | | |
| |||
263 | 277 | | |
264 | 278 | | |
265 | 279 | | |
| 280 | + | |
266 | 281 | | |
267 | 282 | | |
268 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | | - | |
| 137 | + | |
0 commit comments