icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading ChatGPT 4 Splunk
SHA256 checksum (chatgpt-4-splunk_331.tgz) 647e397c66c71af6652cd685bac0931133ad17d7b7360fc45f2eb51e11e7ed48 SHA256 checksum (chatgpt-4-splunk_330.tgz) 43cbb06aef64a3e50237b780750ae56a8f3402bcd88fa58030171956e586f7e7 SHA256 checksum (chatgpt-4-splunk_320.tgz) 382fd1ce5e3c0e37fe78e080c1de94980c20aa83b21caa41ddaf25b7d314fa7f SHA256 checksum (chatgpt-4-splunk_311.tgz) dc2edf0105f64d87cc404d4b43d7e711fff548cc4f207d0190659506436d7f14 SHA256 checksum (chatgpt-4-splunk_310.tgz) a6a8cbc063741a43a3951800227e383a7783af2a914c42c5f43ae584a45d3c77 SHA256 checksum (chatgpt-4-splunk_301.tgz) 1a5ad4bdaf61998b9029ca0cf720d6147a339c1e2a45f9eb24ece746f8b98b32 SHA256 checksum (chatgpt-4-splunk_300.tgz) 4166aa7b30d01147647efbd8e230ae9a647e36e7da4cb8e0bf707164d9531253 SHA256 checksum (chatgpt-4-splunk_222.tgz) b92819d7cb9c39a9565733c449f70f50b41d257c424a91dbbbe424accecb8a37 SHA256 checksum (chatgpt-4-splunk_211.tgz) e206980ed4fad17624c64669e68ef983fab798d6ebf942795abca4977994a1cc SHA256 checksum (chatgpt-4-splunk_210.tgz) f5b795f74f2178c3e445dcffd4745777957ad67d7da940761231e04c06f120fe SHA256 checksum (chatgpt-4-splunk_200.tgz) 2c6f8e43849979daedb3bbae1b561b238269303088cfac297c773973678aaa04 SHA256 checksum (chatgpt-4-splunk_120.tgz) 04ea55156b06aeabd8dc30803d38f00edabc85637fbbea88d1f32569e69e7994
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

splunk

ChatGPT 4 Splunk

Splunk Cloud
Overview
Details
The ChatGPT 4 Splunk is a powerful tool that allows users to easily access the OpenAI API. The add-on is based on the Apache License, Version 2.0 and is designed to work seamlessly with Splunk, the popular data analytics platform.

The add-on now supports Chats, Completions, Edits, and Moderations, making it powerful and user-friendly. This means that users can now perform chat requests, completion requests, edit requests, and moderation requests to the ChatGPT using the SPL command "| openai". This command enables users to quickly and easily generate natural language responses to a wide variety of prompts, making it a valuable tool for anyone working with natural language processing or AI.

Please report issues and discuss feature requests on github: https://github.com/bentleymi/ta-openai-api.

If you want support for private models or Azure OpenAI, please contact the author for our commercial version of the app.

To view the images, please visit https://github.com/bentleymi/ta-openai-api/blob/main/readme.md

Here's how to get ChatGPT for Splunk! Follow these easy steps an you'll have ChatGPT integrated with Splunk in no time:

1. Install using the latest tar.gz or .spl file

2. Add your OpenAI Org & API Key with the setup page:

(ref: https://beta.openai.com/account/org-settings & https://beta.openai.com/account/api-keys)

example image

3. Use the search command: | openai prompt="your prompt" NOTE: org={yourORGID} is no longer supported as of version 2.1.0

example image

The command will create a "ChatCompletion", "Completion", "Edit" or "Moderate" request to the OpenAI API depending on which model you specify:

ref: https://beta.openai.com/docs/api-reference/

The following options are supported by the command:

prompt - Explanation: Optional, your prompt for OpenAI

prompt_field - Explanation: Optional, if streaming data to openai, a field in your result set that you wish to use as a prompt for OpenAI

model - Default: gpt-3.5-turbo - Explanation: Optional, which GPT model to use (ref: https://beta.openai.com/docs/models/). As of Version 3.0.0, if you choose a completion model, code will genearate a completion task. If you choose a moderation model, code will generate a moderation task, and so on.

task - DEPRECATED in Version 3.0.0+ | Default: chat - Explanation: Optional, the task you wish to complete from this list (Chat,Complete,Edit,Moderate)

instruction - Default: None - Explanation: Optional, the instruction you want the Edit/Edits to follow. Note this is only valid when edit models are specified.

max_tokens - Default: None - Explanation: Optional, the maximum number of tokens to generate in the completion.

stop - Default: None - Explanation: Optional, up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.

temperature - Default: None - Explanation: Optional, what sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. We generally recommend altering this or temperature but not both.

top_p - Default: None - Explanation: Optional, an alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.

n - Default: None, max 10 - Explanation: Optional, how many completions to generate for each prompt. Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop.

A simple completion example:

| openai prompt="When was GA, USA founded" model=text-davinci-003 task=completion

completion example image

A simple edit example:

| openai prompt="Orenge" model=text-davinic-edit-001

edit example image 1

A simple edit with instructions example:

| openai prompt="When was GA, USA founded" model=text-davinic-edit-001 instruction="expand the acronyms"

edit example image 2

A simple moderation example:

| openai prompt="I want to kill" model=text-moderation-stable

moderation example image

Data cleaning examples:

Getting 5 incorrect spellings of a US City and then using AI to correct the spelling:

data clensing example image

Chat examples:

| openai prompt="write a hello world js please"

chat example image

Mapping Example:

`comment("Grab some data from an internal index and combine it into one field called raw")`
index=_internal sourcetype=splunk_web_access
| head 10
| rename _raw as raw
| fields raw
| mvcombine raw

`comment("Ask ChatGPT what's the best sourcetype to use for the data")`
| map [| openai model=gpt-4 prompt="What is the best Splunk sourcetype for this data? \n".$raw$]

`comment("Parse the reponse, dropping all but the value of the content field from the response message")`
| spath input=openai_response
| rename choices{}.message.content as response
| table response

mapping example image

Workflow Actions:

workflow actions example image 1

workflow actions example image 2

Streaming Example:

streaming example image

Release Notes

Version 3.3.1
May 18, 2024

v.3.3.1:
- Added app.manifest for Splunk Cloud

Version 3.3.0
May 17, 2024

v.3.3.0
Added GPT-4o
Upgraded Splunk Python SDK to 2.0.1
Updated app.conf
Removed .sh files found by appinspect
Added "chatgpt" as synonym for "openai" now both commands are interchangeable
Added some updates to readme.md

Version 3.2.0
Oct. 13, 2023
  • Added support for multiple orgs and api keys
Version 3.1.1
Oct. 5, 2023

Version 3.1.1:
- Removed legacy AoB Assets to maintain Cloud Compat.

Version 3.1.0
June 28, 2023

Added additional options to "openai" command:
-assistant_prompt - Explanation: Optional, assistant prompt for Chat Completions
-system_prompt - Explanation: Optional, system prompt for Chat Completions
-messages - Explanation: Optional, escaped JSON array of system, user and assistant prompts for Chat Completions

Version 3.0.1
June 14, 2023
  • Added latest 0613 models
Version 3.0.0
June 2, 2023

Version 3.0.0 - ChatGPT4 Support
-Increased model support (added "gpt-4","gpt-4-0314","gpt-4-32k","gpt-4-32k-0314", "text-curie-001","text-babbage-001","text-ada-001","davinci","curie","babbage", and "ada")
-Deprecation of "task" parameter
-Now with 25% more code! (Better error handling)
-General code improvements / optimizations (powered by chatgpt4)

Version 2.2.2
June 1, 2023

Resolves issue #22 with "prompt_field" implementation

Version 2.1.1
May 10, 2023
  • Added sample redaction macros
Version 2.1.0
April 21, 2023

-closes issue #12
-closes issue #13
-Adds workflow actions
-Forces single organization and removes "org" option/parameter from command

Version 2.0.0
March 1, 2023

Release Version 2.0.0:
1. Now supports "ChatGPT" aka "GPT-3.5-Turbo" models
2. Will default to "GPT-3.5-Turbo"
3. Latest libraries from pip openai repo, modified for cloud compat.

Version 1.2.0
Feb. 25, 2023

Release Notes Version 1.2.0:
-Changed everything from "chatgpt" to "openai" to denote that we're using the openai api instead of chatgpt
-Addressed cloud compatibility issue with version 1.1.0
-Endlessly searching for strings to be replaced, and many attempts to pass appinspect


Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or registered trademarks of Splunk Inc. in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.