Releases: Prographers/Slack-GPT
v1.4.2 - Added support for image generation with Dalee-3 using `-tool image`
Added ability to use and generate new tools
To allow GPT model to use a tool you must explicitly provide -tool {NAME}
of that tool. This is a cost-saving measure as it's includes all tools input as part as input tokens.
To create a new tool create new class using inheritance
public partial class TOOL_NAME BaseGptTool, IExpressionGptTool<PARAMETERS>
Code generation will use XML summary comments to complete all necessary implementation details.
Eg:
/// <summary>
/// Generate an image based on the given prompt, returns the URL of the generated image.
/// </summary>
public partial class GenerateImageTool : BaseGptTool, IExpressionGptTool<string, string, QualityEnum?, SizeEnum?, StyleEnum?>
{
private readonly OpenAIClient _api;
public override string[] Aliases { get; } =
{
"image",
"generate-image",
};
public GenerateImageTool(OpenAIClient api) : this()
{
_api = api;
}
/// <summary>
/// Generate an image based on the given prompt, returns the byte array of the generated image, that is then
/// attached AUTOMATICALLY to the response message. Do not mention the image in the response message.
/// </summary>
/// <param name="prompt">
/// Prompt field guides the AI in generating images by providing a clear, concise description of the desired
/// scene or subject, including specific details like the setting, style, and mood. Use descriptive language to specify
/// key elements, context, and artistic styles to ensure the resulting image closely aligns with your vision.
/// </param>
/// <param name="name">
/// Short image name that will be used as file name. Use hyphen and leave out extension format. Use
/// hyphens to mark words
/// </param>
/// <param name="quality">
/// The quality of the image that will be generated. hd creates images with finer details and greater
/// consistency across the image.
/// </param>
/// <param name="size">The size of the generated images, default is square</param>
/// <param name="style">
/// The style of the generated images. Vivid causes the model to lean towards generating hyper-real and
/// dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. Defaults to
/// vivid
/// </param>
/// <returns></returns>
public async Task<CallExpressionResult> CallExpression(string prompt, string name, QualityEnum? quality,
SizeEnum? size, StyleEnum? style)
{
....
}
}
Will additionally generate, but you can also implement this yourself!
public partial class GenerateImageTool
{
public override string Name => "generateimagetool";
public override string Description => "Generate an image based on the given prompt, returns the byte array of the generated image, that is then attached AUTOMATICALLY to the response message. Do not mention the image in the response message.";
public GenerateImageTool()
{
Parameters = new GptToolParameter
{
Type = PropertyType.Object,
Properties = new Dictionary<string, GptToolParameter>
{
["prompt"] = new GptToolParameter
{
Type = PropertyType.String,
Description = "Prompt field guides the AI in generating images by providing a clear, concise description of the desired scene or subject, including specific details like the setting, style, and mood. Use descriptive language to specify key elements, context, and artistic styles to ensure the resulting image closely aligns with your vision.",
Index = 0,
Required = true
},
["name"] = new GptToolParameter
{
Type = PropertyType.String,
Description = "Short image name that will be used as file name. Use hyphen and leave out extension format. Use hyphens to mark words",
Index = 1,
Required = true
},
["quality"] = new GptToolParameter
{
Type = PropertyType.String,
Description = "The quality of the image that will be generated. hd creates images with finer details and greater consistency across the image.",
Index = 2,
Enum = new List<string> { "Standard", "HighDefinition" },
Required = false
},
["size"] = new GptToolParameter
{
Type = PropertyType.String,
Description = "The size of the generated images, default is square",
Index = 3,
Enum = new List<string> { "Square", "Portrait", "Landscape" },
Required = false
},
["style"] = new GptToolParameter
{
Type = PropertyType.String,
Description = "The style of the generated images. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. Defaults to vivid",
Index = 4,
Enum = new List<string> { "Vivid", "Natural" },
Required = false
},
}
};
}
public override async Task<CallExpressionResult> CallExpressionInternal(string jsonParameters, Func<string, Type, object> deserialize)
{
var parameters = (InternalCallingParameters)deserialize(jsonParameters, typeof(InternalCallingParameters));
return await CallExpression(
parameters.prompt,
parameters.name,
parameters.quality,
parameters.size,
parameters.style
);
}
public struct InternalCallingParameters
{
public string prompt { get; set; }
public string name { get; set; }
public Slack_GPT_Socket.Functions.QualityEnum? quality { get; set; }
public Slack_GPT_Socket.Functions.SizeEnum? size { get; set; }
public Slack_GPT_Socket.Functions.StyleEnum? style { get; set; }
}
}
requires file:upload
to properly generate images
v1.4.1 - Added support for embedded and URL images
Added ability to process images from request.
Requires file:read
permission for bot application to read embedded images
v1.4.0 - Added support for o1-preview model
Added ability to select model up to o1-preview including o1-mini and missing GPT-4o
Removed all defaults from the resolver providing a clean slate for model generation. This means cleaner results without our bias.
- MaxToken is now under the hood mapped to max_output_tokens which will no longer force you to remove start new conversation or modify the maxTokens value. By default OpenAI will generate tokens until no longer possible.
- Removed default temperature and topP
Changed default model to GPT-4o without config
v1.3.7 - Added ability to DM a bot and /gpt generate
Added an ability to speak with the bot in DM's instead of at the channel he is invited to.
In DM's bot will
- Answer all messages without mention
- Answer all threads without mentions
Added /gpt generate command to finalize /gpt commands
- Bot using /gpt commands will be limited to 1000 characters
- Will not create a thread
- Will post messages as Ephemeral which are Temporary, and will be gone after some time.
v1.3.6 - Fixed OpenAI "currently overloaded with other requests"
Fixed an issue where OpenAI servers would send:
- That model is currently overloaded with other requests...
- The server is currently overloaded with other requests...
and the API would not retry commands and just throw an error.
Please report any other issues like that if you think they should retry the request a few times on your behalf.
v1.3.5 - Fixed infinity loop on some parameters
Fixed an issue where -context "..."
command would cause an infinity loop on a command thread. Todo for the future, to limit some regex and parsing functions to X seconds to limit potential issues in the future.
v1.3.4 - Improved Whats New command
What's new will now list a few latest versions as well as new release if available!
Full release notes: https://prographers.com/blog/the-exciting-update-to-slack-gpt-new-features-and-fixes
v1.3.2 - Bug fixes
Fixed an issue where multiple commands with the same name could exist.
Full release notes: https://prographers.com/blog/the-exciting-update-to-slack-gpt-new-features-and-fixes
v1.3.1 - Dynamic Commands
Adding to the countless bug fixes there are a few new functionalities
-
Dynamic commands:
/gpt commands
- to preview all dynamic commands that you or your team defined
/gpt commands help
- to display more help
Usage:/gpt commands [add|remove|help] [command] [prompt] [description] [options: -global]
Examples:/gpt commands add -test "This is a test" "This is a test command"
/gpt commands remove -test
/gpt commands help
/gpt commands help -test
/gpt commands
-
WhatsNew
/gpt whatsNew
displays information from latest release, you can check specific version if release was published for it with/gpt whatsNew v1.2.3
-
Added
-context
parameter. That behaves like a system message but for a whole thread
Full release notes: https://prographers.com/blog/the-exciting-update-to-slack-gpt-new-features-and-fixes
v1.2.3 - Custom Commands
Added support for custom commands, and help at /gpt command
Full release notes: https://prographers.com/blog/enhance-your-slack-experience-with-the-chatgpt-slack-bot