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

feat: add langchain support #46

Merged

Conversation

dexhunter
Copy link
Contributor

@dexhunter dexhunter commented Jun 10, 2023

Note: Currently it's just for openai, I think for general llm need to make the backend base more dynamic or conform to some settings by langchain framework. We can follow this example which utilizes from langchain.schema and langchain.output_parsers but not sure if it's desired since we might have less freedom to define some prompts etc but in terms of programming it's less work since we will have some out-of-box functions.

* Add langchain backend
Copy link
Member

@elliottower elliottower left a comment

Choose a reason for hiding this comment

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

Looks good to me, would be nice if there were an easy way to plug in any custom stuff defined in langchain, but this example can clearly be extended. I think another key feature would be langchain agents, either making a wrapper for them to work as a backend or making a custom agent class that can be extended.

@dexhunter
Copy link
Contributor Author

either making a wrapper for them to work as a backend or making a custom agent class that can be extended.

Either way is fine with me, let me know which way you guys decide to go and I can implement accordingly. cc @yuxiang-wu

@yuxiang-wu yuxiang-wu changed the base branch from main to dev June 19, 2023 18:36
@yuxiang-wu yuxiang-wu merged commit 6c3861a into Farama-Foundation:dev Jun 19, 2023
@yuxiang-wu
Copy link
Collaborator

Thank you for your contribution @dexhunter ! I think putting it as a backend is good for now. We can work on a more complex agent later. Thank you @elliottower for the discussion too!

@yuxiang-wu yuxiang-wu added the enhancement New feature or request label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants