bentleymi / chatgpt-4-splunk Goto Github PK
View Code? Open in Web Editor NEWSplunk TA for sending completion requests to ChatGPT
License: Apache License 2.0
Splunk TA for sending completion requests to ChatGPT
License: Apache License 2.0
Added cryptography and pcrypt but didnt use them
Need to pip uninstall --target=... cryptography pcrypt
Name of the app
ChatGPT 4 Splunk
Describe the bug
After having added the organization name and value and the API key and value, I am unable to perform a search using the openai command successfully.
To Reproduce
Steps to reproduce the behavior:
ConductixWampfler
org-blahblahblah
CXW-Splunk
sk-blahbalahasdlfkjasdf
host=namehere source!="Perfmon*" NOT "JIRA-STATS" sourcetype!="atlassian-jira-gc" | openai prompt="Given these logs, why did Jira stop responding?" model="gpt-3.5-turbo"
command="openai", No such organization: org-ABCDEFG12345.
Expected behavior
I would expect:
Splunk SOAR Version (please complete the following information):
Line above references the curl command, should be changed to openai
Currently ChatGPT is not available by API. I originally thought the API was just earlier versions of the same thing but apparently ChatGPT is a specific version of the AI models that are not available via API. Therefore, in the next release we'll be renaming the app to TA-OpenAI-API and changing the command name to be '|openai' instead.
Looks like commands.conf is missing "enableheader=true"
The intended default was the latest but instead it uses version 2 instead of version 3.
chatgpt.py:92: engine = "text-davinci-002"
Should change to
chatgpt.py:92: engine = "text-davinci-003"
prompt=re.sub(r'[\n\r]+', '\n\n', result[options['field']])
Should be this instead:
prompt=re.sub(r'[\n\r]+', '\n\n', result[options['prompt_field']])
Use Case:
We allow multiple employees use ChatGPT at work, but they must use their work email account for their account.
It would be nice to add all of the users API information to Splunk so it would be easy to monitor what they are inputting to ensure PII or PHI information isn't being entering into OpenAPI Cloud Infrastructure.
If the user doesnt specify their orgid then the command will tell them to do so but gives them the old command syntax of "| chatgpt..."
Hi,
Thanks so much for this very useful application!
I have a situation, I have created a prompt that will ask the user to post the source code of a program written in Python, but when I put in the code, the system crashes as it is trying to integrate the code into the actual Simple XML code. I have enclosed the variable in quotes, used the encapsulation so it does not use the characters as Simple XML prompts, but still I having problems.
Here's an example of what I am trying to accomplish:
| openai prompt="Act as a Programmer with 10 years of experience writing code in Python and reviewing the code for bugs. I need you to review this code '$code.tok$' and see where the bugs are. Your output will be the analysis of the code and you will re-write it with your recommendations resolving the bugs found. Make sure you include a detailed analysis of your finding to the user learn for future projects."
So, the variable (token) will contain the actual source code in Python, but the prompt will see it as part of the Simple XML code and won't process it.
Any recommendation on how can I encapsulate the token, so it is treated as the text to be analyzed and does not break the program?
Your assistance is greatly appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.