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

Add openai env options; Add example script #6

Merged
merged 7 commits into from
May 22, 2023
Merged

Conversation

yhyu13
Copy link
Contributor

@yhyu13 yhyu13 commented May 22, 2023

1, Allow users to quickly adjust API key, base url, model using env variables. For example, startup different instances using docker with different .env, etc
2, Add example script from readme to repo
3, Add ReAct prompts as an option
4, Add chat completion api/response support for gpt4/chagpt, and rate limiter exception handle as well

@yhyu13
Copy link
Contributor Author

yhyu13 commented May 22, 2023

Let me know if you have any question about this pr

@kyegomez
Copy link
Owner

kyegomez commented May 22, 2023

Thanks for contributing 😊

Hey it looks great but I published an all-new release and it might conflict with some of the commits you've made, I added in additional params to the solve method of treeofthoughts can you double check and see if there are any conflicts and then submit with all of your changes?

@yhyu13
Copy link
Contributor Author

yhyu13 commented May 22, 2023

Thanks for contributing blush

Hey it looks great but I published an all-new release and it might conflict with some of the commits you've made, I added in additional params to the solve method of treeofthoughts can you double check and see if there are any conflicts and then submit with all of your changes?

Sure thing. It looks fine for now

@yhyu13 yhyu13 mentioned this pull request May 22, 2023
@yhyu13
Copy link
Contributor Author

yhyu13 commented May 22, 2023

Added chat completion support for #7

Sample output from my console:

Using custom api_base https://api.openai-asia.com/v1
Using api_model gpt-4
Generated thoughts: ['Observation: Current large language models rely heavily on pattern recognition and statistical correlations to generate text, lacking a deeper understanding of the underlying logic and reasoning.\n\nThoughts: Next generation reasoning methods for large language models could involve incorporating more structured knowledge representation and', 'Observation: Current large language models rely heavily on pattern matching and statistical associations to generate responses, which may not always lead to coherent or accurate reasoning.\n\nThoughts: To improve reasoning capabilities in next-generation large language models, we should explore incorporating knowledge', 'Observation: Large Language Models have shown promising results in natural language understanding and generation, but there is still room for improvement in terms of reasoning capabilities.\n\nThoughts: To enhance next-generation reasoning methods for Large Language Models, we could explore incorporating structured', 'Observation: Large Language Models (LLMs) have shown impressive performance in natural language understanding and generation tasks, but they still face limitations in terms of reasoning and generalization abilities.\n\nThoughts: To improve the reasoning capabilities of LLMs,', 'Observation: Large Language Models (LLMs) like GPT-3 have shown impressive performance in various tasks, but they still struggle with systematic reasoning and generalization.\n\nThoughts: One possible direction for next-generation reasoning methods in LLMs']
Value text 0.85
value: 0.85
Value text 0.9
value: 0.9
Value text 0.8
value: 0.8
Value text 0.75
value: 0.75
Value text 0.75
value: 0.75
触发限流,请减少调用频率, sleep for 30s, set it by env OPENAI_RATE_TIMEOUT

The output meets expectations? @kyegomez

I don't have write access at this moment, would you like to merge this pr as you see fit? Thanks!
Full change : #6 (comment)

Copy link
Owner

@kyegomez kyegomez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks looks great, can you provide new examples for the readme.md?

@kyegomez kyegomez merged commit f0e1f34 into kyegomez:main May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants