Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation2Demo gives a file path error on Windows #133

Closed
akulyakhtin opened this issue May 15, 2024 · 6 comments · Fixed by #143
Closed

Conversation2Demo gives a file path error on Windows #133

akulyakhtin opened this issue May 15, 2024 · 6 comments · Fixed by #143
Labels
bug Something isn't working

Comments

@akulyakhtin
Copy link

akulyakhtin commented May 15, 2024

Run Conversation2Demo on windows (I've cloned the repo into G:\Code)

Observe the error:

Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:> at index 2: /G:/Code/simple-openai/src/demo/resources/mistral-ai.txt

The error happens in CleverClient in HttpMultipart.java on line 52:

Path path = Path.of((new URL((String)entry.getValue())).getPath());

Best regards,
Alex

@the-gigi
Copy link
Contributor

The path is /G:/Code/simple-openai/src/demo/resources/mistral-ai.txt is invalid on Windows. There should be no slash before the drive letter. Try just G:/Code/simple-openai/src/demo/resources/mistral-ai.txt

@sashirestela
Copy link
Owner

@akulyakhtin Thanks for using simple-openai and for detecting this platform issue. I need some time to setup a Windows environment and replicate the issue. I'll let you know more news.

@sashirestela sashirestela added the bug Something isn't working label May 16, 2024
@akulyakhtin
Copy link
Author

@the-gigi I'm not modifying Conversation2Demo.java in any way. This error happens when I'm executing the latest Conversation2Demo.main as is on Windows.

@akulyakhtin
Copy link
Author

akulyakhtin commented May 16, 2024

Hi @sashirestela @the-gigi could you, please, review a fix for this issue? The fix is in cleverclient project
sashirestela/cleverclient#72

Thank you very much
Alex

@sashirestela
Copy link
Owner

@akulyakhtin Thanks for proactively help me with this Windows issue.

I'm deploying the new version 1.4.3 of cleverclient and it will be integrated with simple-openai in its next release.


If you find this project valuable there are a few ways you can show us your love, preferably all of them 🙂:

  • Letting your friends know about this project 🗣📢.
  • Writing a brief review on your social networks ✍🌐.
  • Giving us a star on Github ⭐.

@akulyakhtin
Copy link
Author

Hi @sashirestela you are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants