| 116 | |
| 117 | @measure |
| 118 | private static async summarize(text: string) { |
| 119 | const response = await model.call(` |
| 120 | Could you please turn the CONVERSATION text below to a stackoverflow style question answer? |
| 121 | If you don't see the question, just return an empty string, DON'T try to make up a question. |
| 122 | If you don't know the answer, just return an empty string, DON'T try to make up an answer. |
| 123 | Keep the question as concise as possible. |
| 124 | Keep the answer as concise as possible. |
| 125 | DON'T crop the question, ensure the question is complete. |
| 126 | DON'T crop the answer, ensure the answer is complete. |
| 127 | No need to say "thanks for asking!" in the answer. |
| 128 | |
| 129 | CONVERSATION |
| 130 | |
| 131 | ${text} |
| 132 | `); |
| 133 | return response; |
| 134 | } |
| 135 | |
| 136 | @measure |
| 137 | private static async askLLM({ |