Splunk Enterprise

ChatGPT

n4w4r
New Member

Hello, I am trying to integrate chatgpt with my dashboard and I am using OpenAPI add on. I am getting the following error code:

"HTTP 404 Not Found -- Could not find object id=TA-openai-api:org_id_default:
ERROR
cannot unpack non-iterable NoneType object"

 

Can anyone help me with this?

Labels (2)
Tags (1)
0 Karma

_JP
Contributor

That error implies that your OpenAPI Org Id was not configured properly during the setup of the ChatGPT 4 Splunk app.

openapi_for_splunk.png

 This app expects to find this info within Splunk's built-in password storage (where it was stored during the setup of this TA)

Here's the python code behind the search command: ChatGPT-4-Splunk/TA-openai-api/bin/openai.py at main · bentleymi/ChatGPT-4-Splunk · GitHub

 

Also, @jkat54 is the author of that particular app.  Just tagging them here if they have any additional suggestions.  See also their session at .conf23.

0 Karma

jkat54
SplunkTrust
SplunkTrust

Thanks for the tag.

Yeah there is some confusion with the latest release because we added the ability to set default api key as well as others and they way we implemented it is causing the issue. 

Basically we need users to enter a default ORG and default KEY but wanted to give them the option to add others as well and yeah I need to rework the setup page.

The screenshots under installation section on GitHub should help clarify

https://github.com/bentleymi/ChatGPT-4-Splunk

 

0 Karma

alberto-sirt
Explorer

I have the same problem, but when I go to change the file $SPLUNK_HOME/etc/apss/TA-openai-api\local\passwords.conf as is describe in de github repository there is not passwords.conf file in  $SPLUNK_HOME/etc/apss/TA-openai-api\local\

I hope ypu can help me.

Thanks in advance

Tags (2)
0 Karma

jkat54
SplunkTrust
SplunkTrust

Did you upgrade from a previous version?  If not then you don't have to edit passwords.conf 

0 Karma

alberto-sirt
Explorer

No, I directly install de application. Should I uninstall de app, install de previous version and upgrade to the current version?

0 Karma

jkat54
SplunkTrust
SplunkTrust

Then you don't need to edit passwords.conf, just use the setup page.

0 Karma

alberto-sirt
Explorer

Thanks to clarify his point with the file .conf, but I am using the setup page from the beginning and when I run something to test like:

| chatgpt org="org-XXXXXXXXXXXXXX" prompt="what means hello mundo?" model="gpt-4o"

I get:

ERROR

HTTP 404 Not Found -- Could not find object id=TA-openai-api:org_id_XXXXXXXXXXXXXXXX:
ERROR
cannot unpack non-iterable NoneType object

 

I copy paste org_id from my company openAI account. I also try two keys one being the owner and other creating a service and in any of them are working

0 Karma

jkat54
SplunkTrust
SplunkTrust

What version of the app do you have?

 

0 Karma

alberto-sirt
Explorer

version 3.31

 

albertosirt_0-1717750271398.png

 

0 Karma

jkat54
SplunkTrust
SplunkTrust

When you complete the setup it will create a local/passwords.conf.

you're saying you don't have a passwords.conf so did you complete the setup?

If so, did you set the default org/key or did you name it something other than default?

When you have default set, you don't have to specify the org or key with the openai/ChatGPT command.

0 Karma

alberto-sirt
Explorer

I finished the setup several times with my org/key in the setup page and I don't have the password.conf

The Splunk is hosted in a server and I am doing the setup form my laptop , I don't know if that can be the reason why I didn't get the  password.conf

0 Karma

jkat54
SplunkTrust
SplunkTrust

Did you put "default" as the org

0 Karma

alberto-sirt
Explorer

No, I inserted my org-id

0 Karma

jkat54
SplunkTrust
SplunkTrust

Can you screenshot a mock up of the setup screen as you configured it with your details redacted? 

0 Karma

alberto-sirt
Explorer

Captura desde 2024-06-07 20-15-32.png

Sirt is the Organization name of my openAI account.
on the organization Value I entered the organization id of my OpenAI account
Splunk-Mdc is the name of the key I created for that and in the API key value I inserted the key

0 Karma

jkat54
SplunkTrust
SplunkTrust

Ok try this

 

| chatgpt org=Sirt key=Splunk-Mdc 

 

or use "default" for the name of the org and key and then the following will work:

 

| chatgpt

alberto-sirt
Explorer

Thanks very much, I raelly appreciate your help.

| chatgpt org=Sirt key=Splunk-Mdc  that was finally working.

0 Karma
Get Updates on the Splunk Community!

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...

SignalFlow: What? Why? How?

What is SignalFlow? Splunk Observability Cloud’s analytics engine, SignalFlow, opens up a world of in-depth ...

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...