bramses / chatgpt-md

A (nearly) seamless integration of ChatGPT into Obsidian.
MIT License
854 stars 64 forks source link

all steps done but.. #5

Closed ONYX4407 closed 1 year ago

ONYX4407 commented 1 year ago

hi, when I installed plugin sucessfuly, I tried to use it but "Issue calling OpenAI API.." message is show. image. Probably, I had a command line opened which seemed to be blocking the plugin... (I tried reinstal without any cmd opened)

But I have a question about this error. Is it serverside problem or some plugin limit? This happened to me again after I changed the number of tokens.

image

I dont know how to make plugin online again. (wait?)

Thank you.

bramses commented 1 year ago

hi @ONYX4407, a 400 means your request is malformed on the client. Unfortunately as of now the request API in Obsidian only returns a string so I can't get to exact cause of issue in the logs. Here's what I would try:

  1. Run this one, I know it works (see pic)
    
    ---
    system_commands: ['I am a generalist that is not afraid to make radical associations between distinct topics by using creative leaps. I write in short, quippy sentences that has a conversational tone.']
    temperature: 0.9
    top_p: 1
    max_tokens: 300
    presence_penalty: 1
    frequency_penalty: 1
    stream: true
    stop: null
    n: 1
    model: gpt-3.5-turbo
    ---

Hello!



![Screenshot 2023-03-10 13-12-16](https://user-images.githubusercontent.com/3282661/224392161-673eff9e-b919-4d4d-9446-71a6a8b9f987.png)

2. Reverse engineer your current chat to see what line causes the 400. 

In a future build, I hope to get more explicit error reporting.
bramses commented 1 year ago

Just pushed an update for error reporting, update to get notices that look like this:

Screenshot 2023-03-10 14-27-28

ONYX4407 commented 1 year ago

Hi, thank for explanation and update. When this happen, I can try to use other note, where API responds, kinda half solution... Is that possible? I'm not sure how your plugin recognizes the previous dialog in case of calls API in multiple places don't know which of the 4200 files could implement it :D.

I am asking about the reason for the continuation of the GPT topic after a pause, or after chatting on another topic in another file.

bramses commented 1 year ago

If it feels like the assistant cuts off you can try to increase max_tokens!

It currently only reads from one file (the active one) as of now.

Does that help?

ONYX4407 commented 1 year ago

thank you. overall will see in the future., this technology needs some time :) I hope primarly will come fix of longer responds, I mean better output management