Git Product home page Git Product logo

docgpt's People

Contributors

cesarhuret avatar magic-wei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docgpt's Issues

Error with footnotes in Word

First: Great stuff! Thanks a bunch!

In Word, when the selection includes a footnote marker, the script gives out an error. Perhaps the script can just send plain text to fix it?

Regardless, thanks again!

Unable to wake up/error 502 in Google Docs

Hi!

I got this error trying to run docGPT in Docs:

Exception: Request failed for https://chatgpt-api.kesarx.repl.co returned code 502. Truncated server response: <!DOCTYPE html> <html lang="en"> <head> <title>Unable To Wake Up</title> <link rel="stylesheet" href="https://fonts.googleapis.... (use muteHttpExceptions option to examine full response)

Looks like a bad gateway, but Iโ€™m by no means an expert.

Thanks for any help and please let me know if you need more information.

Extract content from response (JSON string)

Currently docGPT get a JSON string as response from ChatGPT which contains many useless information. For example, when asking "Can you write a PySide6 example?", the response message looks as follows:

{"choices":[{"finish_reason":"stop","index":0,"message":{"content":"\n\nAs an AI language model, writing code is not my strong suit, but I can give you an example of how you can create a PySide6 program that creates a simple user interface. Here is the code snippet for creating a simple PySide6 window:\n\n```\nfrom PySide6.QtWidgets import QApplication, QMainWindow, QLabel\n\napp = QApplication([])\nwindow = QMainWindow()\nwindow.setWindowTitle(\"My App\")\nlabel = QLabel(\"Hello, World!\")\nwindow.setCentralWidget(label)\nwindow.show()\napp.exec()\n```\n\nIn this example, we import the necessary PySide6 elements and create an instance of the QApplication. Then, we create a QMainWindow instance and set its title to \"My App\". We also create a QLabel and set its text to \"Hello, World!\". We set the label as the central widget of the window and show the window. Finally, we call the `exec()` method of the QApplication instance to start the event loop that handles user input and updates the window.","role":"assistant"}}],"created":1677848730,"id":"chatcmpl-6pzOEBYo5OsArqc1WqfyX1zY6Feke","model":"gpt-3.5-turbo-0301","object":"chat.completion","usage":{"completion_tokens":199,"prompt_tokens":16,"total_tokens":215}}

I believe that for the users, only the "content" field is required to extract and output in human-friendly formats:

As an AI language model, writing code is not my strong suit, but I can give you an example of how you can create a PySide6 program that creates a simple user interface. Here is the code snippet for creating a simple PySide6 window:

'''
from PySide6.QtWidgets import QApplication, QMainWindow, QLabel

app = QApplication([])
window = QMainWindow()
window.setWindowTitle("My App")
label = QLabel("Hello, World!")
window.setCentralWidget(label)
window.show()
app.exec()
'''

In this example, we import the necessary PySide6 elements and create an instance of the QApplication. Then, we create a QMainWindow instance and set its title to "My App". We also create a QLabel and set its text to "Hello, World!". We set the label as the central widget of the window and show the window. Finally, we call the `exec()` method of the QApplication instance to start the event loop that handles user input and updates the window.

Is it possible to create a subprocess for the add-on?

Hi cesarhuret,

Thank you for making this interesting tool for Microsoft Word! I just tested it on my machine, and as you said in README, Word became temporarily unresponsive while waiting for the result from ChatGPT. This could be extremely long when I asked some hard questions. I was wondering is it possible to create a subprocess such that I can use Word when I am waiting for the result? I believe this will give the user a much better experience.

Feature for word/google addon: add default/custom text prompt

I understand the script isn't supposed to be complicated. However, it would be interesting if you were to add the ability for the user to choose additions to the prompt such as "Check this text for grammatical mistakes", "Explain this like I'm a 3-year-old", "Rewrite this with a formal/casual/etc. tone", or "Translate this into fluent English"...
I've already made some simple inelegant changes to add a few more context menu items for my own purposes, but it would be cool to have by default.

Great script by the way!

Use my openAI account

Hello there,

I would like to use my openAI account instead of this one:

function getGPTResponse(question) {

var options = {
'method' : 'post',
'contentType': 'application/json',
// Convert the JavaScript object to a JSON string.
'payload' : JSON.stringify({
'message': question
})
};

const response = UrlFetchApp.fetch('https://chatgpt-api.kesarx.repl.co/chat', options);
const json = JSON.parse(response.getContentText());
return json.choices[0].message.content;
}

Does anyone know how to change it for the openAI chat API? (https://platform.openai.com/docs/api-reference/chat)

Thanks!

not a issue but idea

could you make a chat box inside the google doc itself I know its possible i just dont know how to make it. using the google doc and open ai api you could check for updates in a doc and then send the text inside the document to chatgpt as a prompt. then when gpt replys it pastes it in the document after deleting the prompt so they dont get mixed up. i kinda need it for something so if you make it or know where i can find this reply to me pls

Find a question in this method.

It seems that using chat-gpt in word can't relate the questions in the context. For example, if I ask chat-gpt to answer more concretely about the last question I aksed. It seems that chat can't remember the question. Have you guys come across such a problem. Is there anyway that I can solve this problem?

Help me with my dumb issue

How do I delete the Ask Chatgpt button thingy? The macro was deleted already and the developers tab is now hidden too

Keyboard input is disabled before ChatGPT responds in async mode (Word add-on)

Hi @cesarhuret, I noticed that you're using req.Open "POST", "https://chatgpt-api.kesarx.repl.co/chat", False which sets sync mode and thus makes Word temporarily unresponsive for a while. I tried to change False to True, i.e. async mode and it worked since I could use mouse as usual. However, Keyboard input is disabled before ChatGPT responds. Do you have any idea on this?

Mention EndType.com/addon as alternative

Hi since this project is discontinued you could mention EndType.com/addon as an alternative which can be installed directly from the extension menu (Search for EndType). Works also on Google Sheets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.