Method WriteOffer
- Namespace
- IntentSharp.Specialist
- Assembly
- IntentSharp.Specialist.dll
WriteOffer(SpecialistOffer)
Writes an offer as JSON intent-file text: its definition, with what the offer says about the specialist in
extensions.specialist (provider when it names a configured provider, model, and the facts of
Info: name, id, revision, requestHash,
maxInputTokens, maxOutputTokens, requiredContext and properties), each only when set.
ReadOffer(string, string, IAIProvider?) reads it back to the same offer; a provider the offer brought is not part of the text and
is passed to ReadOffer(string, string, IAIProvider?) again. A SpecialistRuntime keeps a held specialist's
definition this way (DefinitionText).
public static string WriteOffer(SpecialistOffer offer)
Parameters
offerSpecialistOfferThe offer.
Returns
- string
The JSON text of one definition object.
Exceptions
- ArgumentNullException
offeris null.- ArgumentException
The offer carries no definition.