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

merge #1

Merged
merged 418 commits into from
Apr 5, 2023
Merged

merge #1

merged 418 commits into from
Apr 5, 2023

Conversation

davidbuniat
Copy link
Member

No description provided.

hwchase17 and others added 30 commits March 18, 2023 11:12
Add support for Azure OpenAI's ChatGPT API, which uses ChatML markups to
format messages instead of objects.

Related issues: #1591, #1659
Corrected copyright year.
Having service account support in the drive document loader would be
nice.

This is already present in the youtube loader. 

https://github.com/hwchase17/langchain/blob/cb646082baa173fdee7f2b1e361be368acef4e7e/langchain/document_loaders/youtube.py#L76-L78
Fixed typo that said the Wikipedia tool was using Wolfram Alpha (instead
of Wikipedia)
Fix #1756

Use the `namespace` argument of `Pinecone.from_exisiting_index` to set
the default value of `namespace` for other methods. Leads to more
expected behavior and easier integration in chains.

For the test, I've added a line to delete and rebuild the
`langchain-demo` index at the beginning of the test. I'm not 100% sure
if it's a good idea but it makes the test reproducible.
Hi, I just want to add a PR on the prompt serialization examples of
loading from JSON so that it can contain the same as loading from YAML.
…omptTemplate`. (#1755)

Regarding [this
issue](#1754),
`BasePromptTample` class docstring is a little outdated, thus it
requires new method `format_prompt` for now.

As such, I have made some modifications to the docstring to bring it up
to date.

I tried to adhere to the established document style, and would
appreciate you for taking a look at this PR.
…e. (#1753)

Regarding [this
issue](#1754), the code in
the document [Creating a custom prompt
template](https://langchain.readthedocs.io/en/latest/modules/prompts/examples/custom_prompt_template.html)
is no longer functional and outdated.

To address this, I have made the following changes:

1. Updated the guide in the document to use `StringPromptTemplate`
instead of `BasePromptTemplate`.
2. Exposed `StringPromptTemplate` in `prompts/__init__.py` for easier
importing.
I got this during testing 

```
ValueError: Missing some input keys: {'existing_answer'}
```

Upon review, the initial prompt should be `QUESTION_PROMPT_SELECTOR`.

Co-authored-by: Bao Nguyen <bnguyen@roku.com>
Co-authored-by: Aratako <127325395+Aratako@users.noreply.github.com>
)

While it might be a bit more restrictive, I find that using the
Embedding interface as an input for the vector store creation is better
than an embedding function because we can use bulk requests and possibly
the retry logic if needed.

I have seen that some vector store implementations use Embedding while
others use embedding function so I don't know what is the criteria to
have one or the other, in my opinion they should all just be Embedding
or have a way more complex embedding function that accepts multiple
texts instead of one by one.

---------

Co-authored-by: Bernat Felip <bernat.felip@rea.ch>
Co-authored-by: Brian Graham <46691715+briangrahamww@users.noreply.github.com>
Co-authored-by: briangrahamww <brian.graham@ww.com>
Co-authored-by: Aratako <127325395+Aratako@users.noreply.github.com>
Co-authored-by: Hemant <4627288+ghaccount@users.noreply.github.com>
After the changes in #1783, `summary_message_role` is no longer used in
`ConversationSummaryBufferMemory`, so this PR removes it.
From Robert "Right now the dynamic/ route for specifically the above
endpoints is acting on all providers a user has set up, not just the
provider for the supplied API key."
Add request_timeout field to ChatOpenAI. Defaults to 60s.

---------

Co-authored-by: Daniel Chalef <daniel.chalef@private.org>
Co-authored-by: Anish Shah <93145909+ash0ts@users.noreply.github.com>
The base docs are going to be more stable and familiar for folks.
Dynamic route is currently in flux.
Co-authored-by: Vadym Barda <vadim.barda@gmail.com>
sergerdn and others added 27 commits April 3, 2023 14:11
This changes addresses two issues.

First, we add `setuptools` to the dev dependencies in order to debug
tests locally with an IDE, especially with PyCharm. All dependencies dev
dependencies should be installed with `poetry install --extras "dev"`.

Second, we use PurePosixPath instead of Path for URL paths to fix issues
with testing in Windows. This ensures that forward slashes are used as
the path separator regardless of the operating system.

Closes #2334
Nothing special. Just a simple typo fix.
Changes:
- Corrected the title to use hyphens instead of spaces.
- Fixed a typo in the second paragraph where "therefor" was changed to
"Therefore".
- Added a hyphen between "comma" and "separated" in the last paragraph.

File link:
[multi_input_tool.ipynb](https://github.com/hwchase17/langchain/blob/master/docs/modules/agents/tools/multi_input_tool.ipynb)
`persist()` is required even if it's invoked in a script.

Without this, an error is thrown:

```
chromadb.errors.NoIndexException: Index is not initialized
```
Hello! 
I've noticed a bug in `create_pandas_dataframe_agent`. When calling it
with argument `return_intermediate_steps=True`, it doesn't return the
intermediate step. I think the issue is that `kwargs` was not passed
where it needed to be passed. It should be passed into
`AgentExecutor.from_agent_and_tools`

Please correct me if my solution isn't appropriate and I will fix with
the appropriate approach.

Co-authored-by: alhajji <m.alhajji@drahim.sa>
Co-authored-by: Darien Schettler <50381286+darien-schettler@users.noreply.github.com>
Co-authored-by: Darien Schettler <darien_schettler@hotmail.com>
Hi I am learning LangChain and I read that VectorDBQA was changed to
RetrievalQA I thought I could help by making the change if I am wrong
could you give me some feedback I am still learning.

source:
https://blog.langchain.dev/retrieval/#:~:text=Changed%20all%20our,a%20chat%20model
### Motivation / Context

When exploring `load_tools(["requests"] )`, I would have expected all
request method tools to be imported instead of just `RequestsGetTool`.

### Changes

Break `_get_requests` into multiple functions by request method. Each
function returns the `BaseTool` for that particular request method.

In `load_tools`, if the tool name "requests_all" is encountered, we
replace with all `_BASE_TOOLS` that starts with `requests_`.

This way, `load_tools(["requests"])` returns:
- RequestsGetTool
- RequestsPostTool
- RequestsPatchTool
- RequestsPutTool
- RequestsDeleteTool
"via by a developer" -> "by a developer"

---

Thank you for all your hard work!
Currently, `agent_toolkits.sql.create_sql_agent()` passes kwargs to the
`ZeroShotAgent` that it creates but not to `AgentExecutor` that it also
creates. This prevents the caller from providing some useful arguments
like `max_iterations` and `early_stopping_method`

This PR changes `create_sql_agent` so that it passes kwargs to both
constructors.

---------

Co-authored-by: Zachary Jones <zjones@zetaglobal.com>
This pull request adds an enum class for the various types of agents
used in the project, located in the `agent_types.py` file. Currently,
the project is using hardcoded strings for the initialization of these
agents, which can lead to errors and make the code harder to maintain.
With the introduction of the new enums, the code will be more readable
and less error-prone.

The new enum members include:

- ZERO_SHOT_REACT_DESCRIPTION
- REACT_DOCSTORE
- SELF_ASK_WITH_SEARCH
- CONVERSATIONAL_REACT_DESCRIPTION
- CHAT_ZERO_SHOT_REACT_DESCRIPTION
- CHAT_CONVERSATIONAL_REACT_DESCRIPTION

In this PR, I have also replaced the hardcoded strings with the
appropriate enum members throughout the codebase, ensuring a smooth
transition to the new approach.
Update the Dockerfile to use the `$POETRY_HOME` argument to set the
Poetry home directory instead of adding Poetry to the PATH environment
variable.

Add instructions to the `CONTRIBUTING.md` file on how to run tests with
Docker.

Closes #2324
This PR updates Qdrant to 1.1.1 and introduces local mode, so there is
no need to spin up the Qdrant server. By that occasion, the Qdrant
example notebooks also got updated, covering more cases and answering
some commonly asked questions. All the Qdrant's integration tests were
switched to local mode, so no Docker container is required to launch
them.
Co-authored-by: Sahil Masand <masand.sahil@gmail.com>
Co-authored-by: Sahil Masand <masands@cbh.com.au>
Co-authored-by: Wadih Pazos <wadih@wpazos.com>
Co-authored-by: Wadih Pazos Sr <wadih@esgenio.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Revision of "elasticearch" spelling problem

Co-authored-by: gubei <>
@davidbuniat davidbuniat merged commit 97be64f into activeloopai:master Apr 5, 2023
adolkhan pushed a commit that referenced this pull request May 19, 2023
without --no-sandbox param, load documents from url by selenium in
chrome occured error below:

```Traceback (most recent call last):
  File "/data//playgroud/try_langchain.py", line 343, in <module>
    langchain_doc_loader()
  File "/data//playgroud/try_langchain.py", line 67, in langchain_doc_loader
    documents = loader.load()
  File "/install/anaconda3-env/envs/python3.10/lib/python3.10/site-packages/langchain/document_loaders/url_selenium.py", line 102, in load
    driver = self._get_driver()
  File "/install/anaconda3-env/envs/python3.10/lib/python3.10/site-packages/langchain/document_loaders/url_selenium.py", line 76, in _get_driver
    return Chrome(options=chrome_options)
  File "/install/anaconda3-env/envs/python3.10/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 80, in __init__
    super().__init__(
  File "/install/anaconda3-env/envs/python3.10/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 104, in __init__
    super().__init__(
  File "/install/anaconda3-env/envs/python3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 286, in __init__
    self.start_session(capabilities, browser_profile)
  File "/install/anaconda3-env/envs/python3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 378, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/install/anaconda3-env/envs/python3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute
    self.error_handler.check_response(response)
  File "/install/anaconda3-env/envs/python3.10/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
#0 0x55cf8da1bfe3 <unknown>
#1 0x55cf8d75ad36 <unknown>
#2 0x55cf8d783b20 <unknown>
#3 0x55cf8d77fa9b <unknown>
langchain-ai#4 0x55cf8d7c1af7 <unknown>
langchain-ai#5 0x55cf8d7c111f <unknown>
langchain-ai#6 0x55cf8d7b8693 <unknown>
langchain-ai#7 0x55cf8d78b03a <unknown>
langchain-ai#8 0x55cf8d78c17e <unknown>
langchain-ai#9 0x55cf8d9dddbd <unknown>
langchain-ai#10 0x55cf8d9e1c6c <unknown>
langchain-ai#11 0x55cf8d9eb4b0 <unknown>
langchain-ai#12 0x55cf8d9e2d63 <unknown>
langchain-ai#13 0x55cf8d9b5c35 <unknown>
langchain-ai#14 0x55cf8da06138 <unknown>
langchain-ai#15 0x55cf8da062c7 <unknown>
langchain-ai#16 0x55cf8da14093 <unknown>
langchain-ai#17 0x7f3da31a72de start_thread
```

add option `chrome_options.add_argument("--no-sandbox")` for chrome.
adolkhan pushed a commit that referenced this pull request Oct 10, 2023
Initial commit of rl_chain code
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.