Platforms to show: All Mac Windows Linux Cross-Platform
PromptMBS class
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| class | Foundation Models | MBS Swift Plugin | 25.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Prompts can contain content written by you, an outside source, or input directly from people using your app. You can initialize a Prompt from a string literal.
If your prompt includes input from people, consider wrapping the input in a string template with your own prompt to better steer the model's response.
- 2 properties
- method Constructor(Value as String)
- 7 shared methods
- shared method promptBuildArray(prompts() as PromptMBS) as PromptMBS
- shared method promptBuildEitherFirst(prompt as PromptMBS) as PromptMBS
- shared method promptBuildEitherSecond(prompt as PromptMBS) as PromptMBS
- shared method promptExpression(prompt as PromptMBS) as PromptMBS
- shared method promptFromJSON(JSON as MemoryBlock) as PromptMBS
- shared method promptOptional(prompt as PromptMBS) as PromptMBS
- shared method promptString(Value as String) as PromptMBS
This class has no sub classes.
Blog Entries
Some methods using this class:
- LanguageModelSessionsMBS.prewarm(Prompt as PromptMBS = nil)
- LanguageModelSessionsMBS.respond(prompt as PromptMBS) as ResponseMBS
- LanguageModelSessionsMBS.respond(prompt as PromptMBS, theDelegate as ResponseCompletedMBS, tag as Variant = nil)
- LanguageModelSessionsMBS.tokenCount(prompt as PromptMBS) as Integer
- LanguageModelSessionsMBS.tokenCount(prompt as PromptMBS, theDelegate as TokenCountCompletedMBS, tag as Variant = nil)
- SystemLanguageModelsMBS.tokenCount(prompt as PromptMBS) as Integer
Some examples using this class:
Some related classes:
The items on this page are in the following plugins: MBS Swift Plugin.