Closed ahejlsberg closed 11 months ago
How can I try it ? I have installed the last version (v0.0.10) of typechat but in node_modules/typechat, these additions does not exists
Thanks , I have a question ,the request
parameter mandatory. If I would send a promptPreamble with system
and user
roles , what should I put in request
param ? for me request
content is the user
role content ?
Actually I send the same string in request param and also in the user role ( in it's content property )
How can this be used please?
@olawalejuwonm, the key change is here: https://github.com/microsoft/TypeChat/pull/114/files#diff-1ece2a0b089b56f4aa22ef64be65b4305b5e890b560a39d9d12140f9a42d40f4R104
Add a user
message preamble:
translator.translate(data, 'Hello there');
Add a system prompt:
translator.translate(data, [
{ role: 'system', content: 'You are an expert data anonymizer...' }
]);
How do I pass the user content then?
This PR adds support for prompt roles, i.e. prompt sections tagged with
"system"
,"user"
, or"assistant"
roles. TypeChat uses the"user"
role for prompts it generates and the"assistant"
role for previous LLM responses (which will be part of the prompt in repair attempts). TypeChat currently doesn't use the"system"
role.This PR also adds support for specifying a prompt preamble when processing requests. This makes it easier to implement chat-like interactions and conversation history.