langchain
28cc60b3 - Fix langchain.llms OpenAI completion doesn't work due to v1 client update (#13099)

Commit
2 years ago
Fix langchain.llms OpenAI completion doesn't work due to v1 client update (#13099) This commit fixes the issue that langchain.llms OpenAI completion stopped working since the V1 openai client update. Replace this entire comment with: - **Description:** This PR fixes the issue [AttributeError: module 'openai' has no attribute 'Completion'](https://github.com/langchain-ai/langchain/issues/12967) similar to https://github.com/langchain-ai/langchain/commit/8e0cb2eb84539b249198f98f7647a1f24b2392c2 and https://github.com/langchain-ai/langchain/pull/12969, - **Issue:** https://github.com/langchain-ai/langchain/issues/12967, - **Dependencies:** `openai` v1.x.x client, - **Tag maintainer:** @baskaryan, - **Twitter handle:** @dosuken123 Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally. See contribution guidelines for more information on how to write/run tests, lint, etc: https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md If you're adding a new integration, please include: 1. a test for the integration, preferably unit tests that do not rely on network access, 2. an example notebook showing its use. It lives in `docs/extras` directory. If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17. --------- Co-authored-by: Erick Friis <erick@langchain.dev> Co-authored-by: Bagatur <baskaryan@gmail.com>
Author
Parents
Loading