poe-openai-proxy icon indicating copy to clipboard operation
poe-openai-proxy copied to clipboard

Issue with third step

Open Maelstrom602 opened this issue 2 years ago • 22 comments

vim config.toml doesn't seem to be a valid command in powershell, command prompt, or python. I tried installing Vim but I couldn't figure out how to use it. How do I make this config.toml file?

Maelstrom602 avatar May 04 '23 02:05 Maelstrom602

Hello. If you are using Windows, you can use text editors like notepad++ or sublime text to edit the configuration. It's not necessary to use vim in Windows.

juzeon avatar May 04 '23 02:05 juzeon

Oh, I used notepad to put down the various lines- but for some reason I wasn't able to make it a toml file. Currently using Windows 11.

I'm a bit of a newbie.

Maelstrom602 avatar May 04 '23 03:05 Maelstrom602

You can enable the display of file extension first, and then create a txt file and rename it to toml. Google for 'show file extension windows 11'.

juzeon avatar May 04 '23 03:05 juzeon

Changed it to tmol file. Fired up the python external/api.py command.

FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\xxxx\poe-openai-proxy\external\..\config.toml'

(I copypasted the code lines individually instead of copying the entire prompt while making it.)

Maelstrom602 avatar May 04 '23 03:05 Maelstrom602

This means that the program cannot find the configuration file. Did you put it in the right folder (in the same folder as go.mod) and ensure the file name is correct?

juzeon avatar May 04 '23 03:05 juzeon

I think I got it running. Must've typed in the file name wrong.

  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:5x00
  • Running on http://192.168.1.238:5x00 INFO:werkzeug:Press CTRL+C to quit

Do I still need to build the go backend?

Maelstrom602 avatar May 04 '23 03:05 Maelstrom602

Yes you need. The go backend will call apis of the python backend.

juzeon avatar May 04 '23 03:05 juzeon

"'chmod' is not recognized as an internal or external command, operable program or batch file."

Maelstrom602 avatar May 04 '23 03:05 Maelstrom602

On Windows you don't need the chmod step.

juzeon avatar May 04 '23 03:05 juzeon

Oh damn. Which parts do I keep in? It says go isn't recognized as a command.

Maelstrom602 avatar May 04 '23 03:05 Maelstrom602

Thanks for your patience btw. I sometimes have trouble interpreting instructions.

Maelstrom602 avatar May 04 '23 04:05 Maelstrom602

Never mind. You should install golang the programming language first.

juzeon avatar May 04 '23 04:05 juzeon

Alright, I resolved step 5. Will I be able to recieve an api at this point? Or do I have to fetch one for the curl command.

Maelstrom602 avatar May 04 '23 04:05 Maelstrom602

Something like 'register... ok' in the output of the go backend should indicate the successful start of the program. After that you can use curl to do a test referring to the openai document or connect other apps to it by changing the openai endpoint of the corresponding app.

juzeon avatar May 04 '23 04:05 juzeon

It says it's running, but I didn't get "register...ok"

Tried to redo the go build command and it didn't work for some reason. It worked initially, but now I'm getting a blank response, and errors if I pair the top line with "./poe-openai-proxy"

Maelstrom602 avatar May 04 '23 05:05 Maelstrom602

Did you fill in your poe tokens? The tokens written in the README are for demostration purposes only and invalid.

juzeon avatar May 04 '23 05:05 juzeon

Yes. Though I could only fill in one. I removed the other. Couldn't get two separate tokens.

Maelstrom602 avatar May 04 '23 05:05 Maelstrom602

Could you provide the full output of the python and the go backend?

juzeon avatar May 04 '23 05:05 juzeon

C:\Users\xxxx\poe-openai-proxy>python external/api.py # Running on port 5000

  • Serving Flask app 'api'
  • Debug mode: off INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:5000
  • Running on http://192.168.1.238:5000 INFO:werkzeug:Press CTRL+C to quit

main module (test3) does not contain package test3/poe-openai-proxy

Maelstrom602 avatar May 04 '23 05:05 Maelstrom602

Seems that the go program cannot be compile normally. Are this error main module (test3) does not contain package test3/poe-openai-proxy occured when you ran go build? The code do not have a package named test3. Weired. Try to run go mod tidy and re-run go build.

juzeon avatar May 04 '23 09:05 juzeon

Ran -go mod tidy- and got this:

"test3/go/pkg/mod/github.com/op/[email protected]: import path "test3/go/pkg/mod/github.com/op/[email protected]" should not have @version test3/go/pkg/mod/github.com/op/[email protected]/examples: import path "test3/go/pkg/mod/github.com/op/[email protected]/examples" should not have @version"

Maelstrom602 avatar May 05 '23 04:05 Maelstrom602

I've not seen this type of error before. Please do a git pull as I have just commited a new go mod file. Also could you please run go version and provide the version of your go installation?

If this does not help, try this pre-compiled executable file: https://wormhole.app/0WJMP#wMVd6O-jIxQYgy9CSyTujA (for Windows x86_64, downloadable in 24 hours)

juzeon avatar May 05 '23 09:05 juzeon