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

Remove double quotes from respones #4

Open
angelxmoreno opened this issue Jun 1, 2023 · 1 comment
Open

Remove double quotes from respones #4

angelxmoreno opened this issue Jun 1, 2023 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@angelxmoreno
Copy link
Owner

When getting a response using the library, i am seeing things like

"\"Optimize Your CakePHP Testing with Our Expert Tips - Get Started Today!\""

When I am expected to see

"Optimize Your CakePHP Testing with Our Expert Tips - Get Started Today!"
@angelxmoreno angelxmoreno added bug Something isn't working good first issue Good for newcomers labels Jun 1, 2023
@angelxmoreno
Copy link
Owner Author

should be fixed with a simple trim($content, '"') in https://github.com/angelxmoreno/PromptClasses/blob/main/src/Core/AbstractPrompt.php#L80

<?php
...
$content = Hash::get($response, 'choices.0.message.content');
return trim($content, '"');
...

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

No branches or pull requests

1 participant