(resolution: Resolution, endpointName: string)
| 156 | } |
| 157 | |
| 158 | function formatToml(resolution: Resolution, endpointName: string): string { |
| 159 | if (resolution?.type === "base_model") { |
| 160 | return `base_model = "${resolution.from}"\n`; |
| 161 | } |
| 162 | if (resolution?.type === "inline") { |
| 163 | return resolution.content; |
| 164 | } |
| 165 | return `# TODO: fill in details for ${endpointName}\nname = "${endpointName}"\n`; |
| 166 | } |
| 167 | |
| 168 | // --------------------------------------------------------------------------- |
| 169 | // Main |