Skip to content

Commit 124cb6a

Browse files
committed
feat(example): add Chat Template in initial message
1 parent f9ed84a commit 124cb6a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ PODS:
88
- hermes-engine/Pre-built (= 0.72.3)
99
- hermes-engine/Pre-built (0.72.3)
1010
- libevent (2.1.12)
11-
- llama-rn (0.3.5):
11+
- llama-rn (0.3.6):
1212
- RCT-Folly
1313
- RCTRequired
1414
- RCTTypeSafety
@@ -1261,7 +1261,7 @@ SPEC CHECKSUMS:
12611261
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
12621262
hermes-engine: 10fbd3f62405c41ea07e71973ea61e1878d07322
12631263
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
1264-
llama-rn: 1ab4e3bae3136c83dcc2bdcea1ddf0c861335d78
1264+
llama-rn: fbc4775cb24796c7cc59bf04855a669955508f30
12651265
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
12661266
RCTRequired: a2faf4bad4e438ca37b2040cb8f7799baa065c18
12671267
RCTTypeSafety: cb09f3e4747b6d18331a15eb05271de7441ca0b3

example/src/App.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,16 @@ export default function App() {
9494
addSystemMessage(
9595
`Context initialized! \n\nGPU: ${ctx.gpu ? 'YES' : 'NO'} (${
9696
ctx.reasonNoGPU
97-
})\n\n` +
97+
})\nChat Template: ${
98+
ctx.model.isChatTemplateSupported ? 'YES' : 'NO'
99+
}\n\n` +
98100
'You can use the following commands:\n\n' +
101+
'- /info: to get the model info\n' +
99102
'- /bench: to benchmark the model\n' +
100103
'- /release: release the context\n' +
101104
'- /stop: stop the current completion\n' +
102-
'- /reset: reset the conversation',
103-
'- /save-session: save the session tokens\n' +
105+
'- /reset: reset the conversation' +
106+
'- /save-session: save the session tokens\n' +
104107
'- /load-session: load the session tokens',
105108
)
106109
})

0 commit comments

Comments
 (0)