OpenAi Plugin needs

Hello everyone. I've decided to see what happens when I connect my computer to the Borg.... err I mean create an OpenAi plugin for Directory Opus.

According to Bard Ai this is what features I'll have to add so that its capable of connecting with the OpenAi API:

OpenAI API Commands Unavailable in Directory Opus

Directory Opus currently lacks the ability to directly connect with the OpenAI API and utilize its functionalities. As a result, various commands needed for interacting with the OpenAI API are unavailable within Directory Opus. Here's a list of some prominent examples:

Authentication and Authorization:

  • login: This command would be used to initiate a login process with the OpenAI API, providing credentials like API key and access token.
  • refresh_token: This command would refresh the access token for continued API access after expiration.

API Data Access and Manipulation:

  • list_models: This command would retrieve a list of available OpenAI models and their capabilities.
  • get_model_info: This command would provide detailed information about a specific OpenAI model.
  • create_completion: This command would create a text completion based on a given prompt and selected model.
  • edit_completion: This command would edit an existing text completion, providing additional information or refining the output.
  • translate: This command would translate text from one language to another using OpenAI's translation models.
  • answer_question: This command would ask a question to OpenAI and receive an informative answer based on its knowledge and understanding.

File Management and Interaction:

  • upload_file: This command would upload a file to OpenAI for processing, analysis, or generation based on the selected model.
  • download_file: This command would download a file generated by OpenAI after processing or manipulation.
  • annotate_file: This command would add annotations or comments to a specific file within Directory Opus using insights generated by OpenAI.

Additional functionalities:

  • manage_configurations: This command would allow users to manage their OpenAI configurations, such as preferred models and settings.
  • track_usage: This command would provide users with information about their OpenAI usage, including API calls and resource consumption.
  • get_support: This command would help users access OpenAI's support resources and documentation.

This list provides a starting point for understanding the range of functionalities currently unavailable in Directory Opus due to its limited API accessibility. The specific commands needed will depend on your desired workflow and intended use of OpenAI within Directory Opus.

The plan is to create User Commands in cURL. Then the Plugin will be the follow up.

Am I going in the right direction?

Greg (the other one)

There's not really any connection between a file manager and a large language model. I don't see what the point would be here.

"AI" is not real intelligence. It can't write code for you. It can't do anything except string words together in a convincing order, but there's no meaning or understanding behind it.

We aren't planning on jumping on the AI bandwagon, so won't be able to offer any assistance here I'm sorry.

4 Likes

Actually I want to use Directory Opus to interface an Ai to my directories to use the chat windows to fix problems in config files and stuff like that.

So far I got Opus to speak to the OpenAi server and fail. So I got the HTTP part working. Bard and GPT4 made the code for me, and utilised them to get the bloody code to work. I only used English conversation with them to do it. Neither of them alone can do it, but together they work very well in a Manager / Tallent type of way.

Bard is able to make well planned code that doesn't work. Then GPT4 is able to fix it up. But GPT4 is not able to plan ahead enough.

The greater planning does require a human (me), but I hope this will get me to the point where I'm able to fix up .ini files or whatever.

So there is a point. At least for me.
I've worked all morning (oh god, its 4pm already!) setting up my IDE for working with the two of them, Git, and so forth in a fresh Browser (Brave) free of history.

So now I go and charge at the windmills with my imaginary friends!

Most probably - no.

I don't know what are your user scenarios, but except for simple snippets, AI really sucks at producing anything usable, unless it accidentally duplicates someone's code verbatim. It may help a bit with boilerplate-driven languages with producing the boilerplate though.
Any larger body of AI code falls into one of 2 categories: not working and bug-ridden (that is working exactly with the scenario provided and barely with anything else). Not to mention its comprehensibility.

Star Trek Scotty GIF - Star Trek Scotty Computer - Discover & Share GIFs

Here are the seven cURL new UserCommands for use by a Jscript plugin:

  1. Start a New Conversation:
    curl --location --request POST 'https://api.openai.com/v1/chat/completions'
    --header 'Authorization: Bearer YOUR_API_KEY'
    --header 'Content-Type: application/json'
    --data-raw '{
    "messages": [
    {"role": "system", "content": "You are a user."}
    {"role": "user", "content": "Hello, I would like to start a new conversation."}
    ]
    }'
    This command initiates a new conversation with the ChatGPT API�9†source�.
  2. Send User Message:
    curl --location --request POST 'https://api.openai.com/v1/chat/completions'
    --header 'Authorization: Bearer YOUR_API_KEY'
    --header 'Content-Type: application/json'
    --data-raw '{
    "messages": [
    {"role": "user", "content": "This is my user message."}
    ]
    }'
    This command sends a user message to the ongoing conversation with the ChatGPT API
    �10†source�.
  3. Send System Message:
    curl --location --request POST 'https://api.openai.com/v1/chat/completions'
    --header 'Authorization: Bearer YOUR_API_KEY'
    --header 'Content-Type: application/json'
    --data-raw '{
    "messages": [
    {"role": "system", "content": "This is my system message."}
    ]
    }'
    This command sends a system message to the ongoing conversation with the ChatGPT API
    �11†source�.
  4. Retrieve Chat History:
    curl -X GET
    -H "Authorization: Bearer "
    "https://api.openai.com/v1/conversations//messages?limit="
    This command retrieves the chat history from the ChatGPT API during an ongoing conversation
    �13†source�.
  5. Send a Message (Example):
    curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
    "messages": [
    {
    "role": "system",
    "content": "Hello ChatGPT!"
    }
    ]
    "conversation_id": "CONVERSATION_ID"
    }' "https://api.openai.com/v1/chat/completions"
    This is an example of a cURL command that sends a message to the ChatGPT API�14†source�.
  6. Retrieve the Assistant's Response:
    curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
    "model": "gpt-3.5-turbo",
    "messages": [
    {"role": "system", "content": "You are a world-class software engineer."},
    {"role": "user", "content": "What is the weather like today?"}
    ]
    }' "https://api.openai.com/v1/chat/completions"
    This command retrieves the assistant's response from the ChatGPT API for an ongoing
    conversation�15†source�.
  7. General Command for Interaction:
    curl --location --request POST 'https://api.openai.com/v1/chat/completions'
    --header 'Content-Type: application/json'
    --header 'Authorization: Bearer YOUR_API_KEY'
    --data-raw '{
    "model": "gpt-3.5-turbo",
    "messages": [
    {"role": "system", "content": "You are a user-friendly assistant."},
    {"role": "user", "content": "Hello how are you?"}
    ]
    }'
    This is a general cURL command for interacting with the ChatGPT API, specifying the model and
    conversation messages

It seems you’re asking an AI to come up with a big load of text and code, and then asking people who understand how things work to check its makes sense (it doesn’t), while doing nothing yourself. This isn’t how programming works, and is a waste of everyone’s time.

If you want to write code, you need to learn how to do it. AI will not provide a useful shortcut here.

1 Like