(llm: ILLM)
| 121 | } |
| 122 | |
| 123 | function shouldInjectApplyToken(llm: ILLM): boolean { |
| 124 | const model = llm.model?.toLowerCase() ?? ""; |
| 125 | return ( |
| 126 | llm.underlyingProviderName === "inception" && model.includes("mercury") |
| 127 | ); |
| 128 | } |
| 129 | |
| 130 | function appendTokenToLastMessage( |
| 131 | messages: ChatMessage[], |