Skip to content

Commit

Permalink
feat(example): add Chat Template in initial message
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Jul 29, 2024
1 parent f9ed84a commit 124cb6a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PODS:
- hermes-engine/Pre-built (= 0.72.3)
- hermes-engine/Pre-built (0.72.3)
- libevent (2.1.12)
- llama-rn (0.3.5):
- llama-rn (0.3.6):
- RCT-Folly
- RCTRequired
- RCTTypeSafety
Expand Down Expand Up @@ -1261,7 +1261,7 @@ SPEC CHECKSUMS:
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
hermes-engine: 10fbd3f62405c41ea07e71973ea61e1878d07322
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
llama-rn: 1ab4e3bae3136c83dcc2bdcea1ddf0c861335d78
llama-rn: fbc4775cb24796c7cc59bf04855a669955508f30
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: a2faf4bad4e438ca37b2040cb8f7799baa065c18
RCTTypeSafety: cb09f3e4747b6d18331a15eb05271de7441ca0b3
Expand Down
9 changes: 6 additions & 3 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,16 @@ export default function App() {
addSystemMessage(
`Context initialized! \n\nGPU: ${ctx.gpu ? 'YES' : 'NO'} (${
ctx.reasonNoGPU
})\n\n` +
})\nChat Template: ${
ctx.model.isChatTemplateSupported ? 'YES' : 'NO'
}\n\n` +
'You can use the following commands:\n\n' +
'- /info: to get the model info\n' +
'- /bench: to benchmark the model\n' +
'- /release: release the context\n' +
'- /stop: stop the current completion\n' +
'- /reset: reset the conversation',
'- /save-session: save the session tokens\n' +
'- /reset: reset the conversation' +
'- /save-session: save the session tokens\n' +
'- /load-session: load the session tokens',
)
})
Expand Down

0 comments on commit 124cb6a

Please sign in to comment.