Compare commits

..

186 Commits

Author SHA1 Message Date
Ankush Gola
d598e43b08 fix output parsing for chat agent 2023-05-27 14:30:10 -07:00
Russ
6e974b5f04 Fix typos (#5323)
# Documentation typo fixes

Fixes # (issue)

Simple typos in the blockchain .ipynb documentation
2023-05-26 18:55:21 -07:00
Michael Landis
f75f0dbad6 docs: improve flow of llm caching notebook (#5309)
# docs: improve flow of llm caching notebook

The notebook `llm_caching` demos various caching providers. In the
previous version, there was setup common to all examples but under the
`In Memory Caching` heading.

If a user comes and only wants to try a particular example, they will
run the common setup, then the cells for the specific provider they are
interested in. Then they will get import and variable reference errors.
This commit moves the common setup to the top to avoid this.

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:

@dev2049
2023-05-26 13:34:11 -04:00
Eugene Yurtsev
0a8d6bc402 Add instructions to pyproject.toml (#5138)
# Add instructions to pyproject.toml

* Add instructions to pyproject.toml about how to handle optional
dependencies.

## Before submitting


## Who can review?

---------

Co-authored-by: Davis Chase <130488702+dev2049@users.noreply.github.com>
Co-authored-by: Zander Chase <130414180+vowelparrot@users.noreply.github.com>
2023-05-26 13:29:07 -04:00
Shukri
58e95cd11e Better docs for weaviate hybrid search (#5290)
# Better docs for weaviate hybrid search

<!--
Thank you for contributing to LangChain! Your PR will appear in our next
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.
-->

<!-- Remove if not applicable -->

Fixes: NA

## Before submitting

<!-- If you're adding a new integration, include an integration test and
an example notebook showing its use! -->

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:

<!-- For a quicker response, figure out the right person to tag with @

        @hwchase17 - project lead

        Tracing / Callbacks
        - @agola11

        Async
        - @agola11

        DataLoaders
        - @eyurtsev

        Models
        - @hwchase17
        - @agola11

        Agents / Tools / Toolkits
        - @vowelparrot
        
        VectorStores / Retrievers / Memory
        - @dev2049
        
 -->
@dev2049
2023-05-26 09:30:41 -07:00
Davis Chase
641303a361 bump 181 (#5302) 2023-05-26 08:44:19 -07:00
Leonid Kuligin
aa3c7b3271 Fixed passing creds to VertexAI LLM (#5297)
# Fixed passing creds to VertexAI LLM

Fixes  #5279 

It looks like we should drop a type annotation for Credentials.

Co-authored-by: Leonid Kuligin <kuligin@google.com>
2023-05-26 08:31:02 -07:00
Eugene Yurtsev
a669abf16b Update CONTRIBUTION guidelines and PR Template (#5140)
# Update contribution guidelines and PR template

This PR updates the contribution guidelines to include more information
on how to handle optional dependencies. 

The PR template is updated to include a link to the contribution guidelines document.
2023-05-26 10:18:11 -04:00
Peng Qu
d481d887bc Add an example to make the prompt more robust (#5291)
# Add example to LLMMath to help with power operator

Add example to LLMMath that helps the model to interpret `^` as the power operator rather than the python xor operator.
2023-05-26 09:32:35 -04:00
Xiangrui Meng
aec642febb LLM wrapper for Databricks (#5142)
This PR adds LLM wrapper for Databricks. It supports two endpoint types:
* serving endpoint
* cluster driver proxy app

An integration notebook is included to show how it works.


Co-authored-by: Davis Chase <130488702+dev2049@users.noreply.github.com>
Co-authored-by: Gengliang Wang <gengliang@apache.org>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-25 19:19:37 -07:00
Ted Martinez
1cb6498fdb Tedma4/twilio tool (#5136)
# Add twilio sms tool

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-25 19:19:22 -07:00
Moonsik Kang
a0281f5acb Fixed typo: 'ouput' to 'output' in all documentation (#5272)
# Fixed typo: 'ouput' to 'output' in all documentation

In this instance, the typo 'ouput' was amended to 'output' in all
occurrences within the documentation. There are no dependencies required
for this change.
2023-05-25 19:18:31 -07:00
Michael Landis
7047a2c1af feat: add Momento as a standard cache and chat message history provider (#5221)
# Add Momento as a standard cache and chat message history provider

This PR adds Momento as a standard caching provider. Implements the
interface, adds integration tests, and documentation. We also add
Momento as a chat history message provider along with integration tests,
and documentation.

[Momento](https://www.gomomento.com/) is a fully serverless cache.
Similar to S3 or DynamoDB, it requires zero configuration,
infrastructure management, and is instantly available. Users sign up for
free and get 50GB of data in/out for free every month.

## Before submitting

 We have added documentation, notebooks, and integration tests
demonstrating usage.

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-25 19:13:21 -07:00
Hassan Ouda
56ad56c812 Support bigquery dialect - SQL (#5261)
# Your PR Title (What it does)

Adding an if statement to deal with bigquery sql dialect. When I use
bigquery dialect before, it failed while using SET search_path TO. So
added a condition to set dataset as the schema parameter which is
equivalent to SET search_path TO . I have tested and it works.


## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:
@dev2049
2023-05-25 18:19:17 -07:00
Abdelsalam ElTamawy
2ef5579eae Added pipline args to HuggingFacePipeline.from_model_id (#5268)
The current `HuggingFacePipeline.from_model_id` does not allow passing
of pipeline arguments to the transformer pipeline.
This PR enables adding important pipeline parameters like setting
`max_new_tokens` for example.
Previous to this PR it would be necessary to manually create the
pipeline through huggingface transformers then handing it to langchain.

For example instead of this
```py
model_id = "gpt2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
pipe = pipeline(
    "text-generation", model=model, tokenizer=tokenizer, max_new_tokens=10
)
hf = HuggingFacePipeline(pipeline=pipe)
```
You can write this
```py
hf = HuggingFacePipeline.from_model_id(
    model_id="gpt2", task="text-generation", pipeline_kwargs={"max_new_tokens": 10}
)
```


Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-25 17:54:52 -07:00
Davis Chase
f01dfe858d OpenAI lint (#5273)
Causing lint issues if you have openai installed, annoying for local dev
2023-05-25 16:20:06 -07:00
Nicholas Liu
7652d2abb0 Add Multi-CSV/DF support in CSV and DataFrame Toolkits (#5009)
Add Multi-CSV/DF support in CSV and DataFrame Toolkits
* CSV and DataFrame toolkits now accept list of CSVs/DFs
* Add default prompts for many dataframes in `pandas_dataframe` toolkit

Fixes #1958
Potentially fixes #4423

## Testing
* Add single and multi-dataframe integration tests for
`pandas_dataframe` toolkit with permutations of `include_df_in_prompt`
* Add single and multi-CSV integration tests for csv toolkit
---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2023-05-25 14:23:11 -07:00
Alex Rothberg
3223a97dc6 Add visible_only and strict_mode options to ClickTool (#4088)
Partially addresses: https://github.com/hwchase17/langchain/issues/4066
2023-05-25 14:10:39 -07:00
Ravindra Marella
b3988621c5 Add C Transformers for GGML Models (#5218)
# Add C Transformers for GGML Models
I created Python bindings for the GGML models:
https://github.com/marella/ctransformers

Currently it supports GPT-2, GPT-J, GPT-NeoX, LLaMA, MPT, etc. See
[Supported
Models](https://github.com/marella/ctransformers#supported-models).


It provides a unified interface for all models:

```python
from langchain.llms import CTransformers

llm = CTransformers(model='/path/to/ggml-gpt-2.bin', model_type='gpt2')

print(llm('AI is going to'))
```

It can be used with models hosted on the Hugging Face Hub:

```py
llm = CTransformers(model='marella/gpt-2-ggml')
```

It supports streaming:

```py
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler

llm = CTransformers(model='marella/gpt-2-ggml', callbacks=[StreamingStdOutCallbackHandler()])
```

Please see [README](https://github.com/marella/ctransformers#readme) for
more details.
---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-25 13:42:44 -07:00
Davis Chase
ca88b25da6 Zep sdk version (#5267)
zep-python's sync methods no longer need an asyncio wrapper. This was
causing issues with FastAPI deployment.
Zep also now supports putting and getting of arbitrary message metadata.

Bump zep-python version to v0.30

Remove nest-asyncio from Zep example notebooks.

Modify tests to include metadata.

---------

Co-authored-by: Daniel Chalef <daniel.chalef@private.org>
Co-authored-by: Daniel Chalef <131175+danielchalef@users.noreply.github.com>
2023-05-25 13:42:10 -07:00
Janil Wörst
5525602df0 Docs link custom agent page in getting started (#5250)
# Docs: link custom agent page in getting started
2023-05-25 13:11:30 -07:00
Alon Diament
d3cd21ccf8 Fixed regression in JoplinLoader's get note url (#5265)
Fixes a regression in JoplinLoader that was introduced during the code
review (bad `page` wildcard in _get_note_url).

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:

@dev2049
@leo-gan
2023-05-25 13:10:10 -07:00
Davis Chase
3be9ba14f3 OpenSearch top k parameter fix (#5216)
For most queries it's the `size` parameter that determines final number
of documents to return. Since our abstractions refer to this as `k`, set
this to be `k` everywhere instead of expecting a separate param. Would
be great to have someone more familiar with OpenSearch validate that
this is reasonable (e.g. that having `size` and what OpenSearch calls
`k` be the same won't lead to any strange behavior). cc @naveentatikonda

Closes #5212
2023-05-25 09:51:23 -07:00
Yves Maurer
88ed8e1cd6 Added the option of specifying a proxy for the OpenAI API (#5246)
# Added the option of specifying a proxy for the OpenAI API

Fixes #5243

Co-authored-by: Yves Maurer <>
2023-05-25 09:50:25 -07:00
mwinterde
9c0cb90997 Resolve error in StructuredOutputParser docs (#5240)
# Resolve error in StructuredOutputParser docs

Documentation for `StructuredOutputParser` currently not reproducible,
that is, `output_parser.parse(output)` raises an error because the LLM
returns a response with an invalid format

```python
_input = prompt.format_prompt(question="what's the capital of france")
output = model(_input.to_string())

output

# ?
#
# ```json
# {
# 	"answer": "Paris",
# 	"source": "https://www.worldatlas.com/articles/what-is-the-capital-of-france.html"
# }
# ```
```

Was fixed by adding a question mark to the prompt
2023-05-25 07:47:25 -07:00
Peng Qu
c7e2151a4b remove extra "\n" to ensure that the format of the description, examp… (#5232)
remove extra "\n" to ensure that the format of the description, example,
and prompt&generation are completely consistent.
2023-05-25 07:46:39 -07:00
Davis Chase
15b17f9334 bump 180 (#5248) 2023-05-25 07:09:50 -07:00
mwinterde
9e57be4b5c Fix typo in docstring of RetryWithErrorOutputParser (#5244) 2023-05-25 09:59:31 -04:00
Shukri
09e246f306 Weaviate: Add QnA with sources example (#5247)
# Add QnA with sources example 

<!--
Thank you for contributing to LangChain! Your PR will appear in our next
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.
-->

<!-- Remove if not applicable -->

Fixes: see
https://stackoverflow.com/questions/76207160/langchain-doesnt-work-with-weaviate-vector-database-getting-valueerror/76210017#76210017

## Before submitting

<!-- If you're adding a new integration, include an integration test and
an example notebook showing its use! -->

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:

<!-- For a quicker response, figure out the right person to tag with @

        @hwchase17 - project lead

        Tracing / Callbacks
        - @agola11

        Async
        - @agola11

        DataLoaders
        - @eyurtsev

        Models
        - @hwchase17
        - @agola11

        Agents / Tools / Toolkits
        - @vowelparrot
        
        VectorStores / Retrievers / Memory
        - @dev2049
        
 -->
@dev2049
2023-05-25 09:58:33 -04:00
Archon
5cdd9ab7e1 Add MiniMax embeddings (#5174)
- Add support for MiniMax embeddings

Doc: [MiniMax
embeddings](https://api.minimax.chat/document/guides/embeddings?id=6464722084cdc277dfaa966a)

---------

Co-authored-by: Archon <archongum@outlook.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-25 06:57:49 -07:00
Eugene Yurtsev
5cfa72a130 Bibtex integration for document loader and retriever (#5137)
# Bibtex integration

Wrap bibtexparser to retrieve a list of docs from a bibtex file.
* Get the metadata from the bibtex entries
* `page_content` get from the local pdf referenced in the `file` field
of the bibtex entry using `pymupdf`
* If no valid pdf file, `page_content` set to the `abstract` field of
the bibtex entry
* Support Zotero flavour using regex to get the file path
* Added usage example in
`docs/modules/indexes/document_loaders/examples/bibtex.ipynb`
---------

Co-authored-by: Sébastien M. Popoff <sebastien.popoff@espci.fr>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-25 00:21:31 -07:00
Ati Sharma
40b086d6e8 Allow to specify ID when adding to the FAISS vectorstore. (#5190)
# Allow to specify ID when adding to the FAISS vectorstore

This change allows unique IDs to be specified when adding documents /
embeddings to a faiss vectorstore.

- This reflects the current approach with the chroma vectorstore.
- It allows rejection of inserts on duplicate IDs
- will allow deletion / update by searching on deterministic ID (such as
a hash).
- If not specified, a random UUID is generated (as per previous
behaviour, so non-breaking).

This commit fixes #5065 and #3896 and should fix #2699 indirectly. I've
tested adding and merging.

Kindly tagging @Xmaster6y @dev2049 for review.

---------

Co-authored-by: Ati Sharma <ati@agalmic.ltd>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2023-05-24 22:26:46 -07:00
Nicholas Liu
f0ea093de8 Change Default GoogleDriveLoader Behavior to not Load Trashed Files (issue #5104) (#5220)
# Change Default GoogleDriveLoader Behavior to not Load Trashed Files
(issue #5104)

Fixes #5104

If the previous behavior of loading files that used to live in the
folder, but are now trashed, you can use the `load_trashed_files`
parameter:

```
loader = GoogleDriveLoader(
    folder_id="1yucgL9WGgWZdM1TOuKkeghlPizuzMYb5",
    recursive=False,
    load_trashed_files=True
)
```

As not loading trashed files should be expected behavior, should we
1. even provide the `load_trashed_files` parameter?
2. add documentation? Feels most users will stick with default behavior

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:

DataLoaders
- @eyurtsev

Twitter: [@nicholasliu77](https://twitter.com/nicholasliu77)
2023-05-24 22:26:17 -07:00
Keno
eff31a3361 Remove API key from docs (#5223)
I found an API key for `serpapi_api_key` while reading the docs. It
seems to have been modified very recently. Removed it in this PR
@hwchase17 - project lead
2023-05-24 22:25:39 -07:00
maspotts
95c9aa1ccb Create async copy of from_text() inside GraphIndexCreator. (#5214)
Copies `GraphIndexCreator.from_text()` to make an async version called
`GraphIndexCreator.afrom_text()`.

This is (should be) a trivial change: it just adds a copy of
`GraphIndexCreator.from_text()` which is async and awaits a call to
`chain.apredict()` instead of `chain.predict()`. There is no unit test
for GraphIndexCreator, and I did not create one, but this code works for
me locally.

@agola11 @hwchase17
2023-05-24 21:54:12 -07:00
Leonid Ganeline
2ad29f410d fix a mistake in concepts.md (#5222)
# fix a mistake in concepts.md


## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:
2023-05-24 21:47:22 -07:00
Harrison Chase
a775aa6389 Harrison/vertex (#5049)
Co-authored-by: Leonid Kuligin <kuligin@google.com>
Co-authored-by: Leonid Kuligin <lkuligin@yandex.ru>
Co-authored-by: sasha-gitg <44654632+sasha-gitg@users.noreply.github.com>
Co-authored-by: Justin Flick <Justinjayflick@gmail.com>
Co-authored-by: Justin Flick <jflick@homesite.com>
2023-05-24 15:51:12 -07:00
Zander Chase
e6c4571191 Add 'status' command to get server status (#5197)
Example:


```
$ langchain plus start --expose
...
$ langchain plus status
The LangChainPlus server is currently running.

Service             Status         Published Ports
langchain-backend   Up 40 seconds  1984
langchain-db        Up 41 seconds  5433
langchain-frontend  Up 40 seconds  80
ngrok               Up 41 seconds  4040

To connect, set the following environment variables in your LangChain application:
LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT=https://5cef-70-23-89-158.ngrok.io

$ langchain plus stop
$ langchain plus status
The LangChainPlus server is not running.
$ langchain plus start
The LangChainPlus server is currently running.

Service             Status        Published Ports
langchain-backend   Up 5 seconds  1984
langchain-db        Up 6 seconds  5433
langchain-frontend  Up 5 seconds  80

To connect, set the following environment variables in your LangChain application:
LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT=http://localhost:1984
```
2023-05-24 21:43:16 +00:00
Zander Chase
e76e68b211 Add Delete Session Method (#5193) 2023-05-24 21:06:03 +00:00
Zander Chase
66113c2a62 Log warning (#5192)
Changes debug log to warning log when LC Tracer fails to instantiate
2023-05-24 21:05:13 +00:00
Ankush Gola
b7fcb35a39 add option to pass openai key to langchain plus command (#5213) 2023-05-24 21:05:03 +00:00
Davis Chase
dcee8936c1 nit (#5208) 2023-05-24 12:52:20 -07:00
Alon Diament
44abe925df Add Joplin document loader (#5153)
# Add Joplin document loader

[Joplin](https://joplinapp.org/) is an open source note-taking app.

Joplin has a [REST API](https://joplinapp.org/api/references/rest_api/)
for accessing its local database. The proposed `JoplinLoader` uses the
API to retrieve all notes in the database and their metadata. Joplin
needs to be installed and running locally, and an access token is
required.

- The PR includes an integration test.
- The PR includes an example notebook.

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 12:31:55 -07:00
Rodrigo Siqueira
f10be072ff Add Iugu document loader (#5162)
Create IUGU loader
---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 11:47:01 -07:00
ByronHsu
f0730c6489 Allow readthedoc loader to pass custom html tag (#5175)
## Description

The html structure of readthedocs can differ. Currently, the html tag is
hardcoded in the reader, and unable to fit into some cases. This pr
includes the following changes:

1. Replace `find_all` with `find` because we just want one tag.
2. Provide `custom_html_tag` to the loader.
3. Add tests for readthedoc loader
4. Refactor code

## Issues

See more in https://github.com/hwchase17/langchain/pull/2609. The
problem was not completely fixed in that pr.
---------

Signed-off-by: byhsu <byhsu@linkedin.com>
Co-authored-by: byhsu <byhsu@linkedin.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 10:40:27 -07:00
Alexander Dibrov
d8eed6018f Output parsing variation allowance (#5178)
# Output parsing variation allowance for self-ask with search

This change makes self-ask with search easier for Llama models to
follow, as they tend toward returning 'Followup:' instead of 'Follow
up:' despite an otherwise valid remaining output.


Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 10:39:09 -07:00
Matt Wells
c173bf1c62 Fixes scope of query Session in PGVector (#5194)
`vectorstore.PGVector`: The transactional boundary should be increased
to cover the query itself

Currently, within the `similarity_search_with_score_by_vector` the
transactional boundary (created via the `Session` call) does not include
the select query being made.

This can result in un-intended consequences when interacting with the
PGVector instance methods directly


---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 10:37:45 -07:00
Tommaso De Lorenzo
52714cedd4 fixing total cost finetuned model giving zero (#5144)
# OpanAI finetuned model giving zero tokens cost

Very simple fix to the previously committed solution to allowing
finetuned Openai models.

Improves #5127 

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 10:04:08 -07:00
Harrison Chase
94cf391ef1 standardize json parsing (#5168)
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 10:03:53 -07:00
Davis Chase
2b2176a3c1 tfidf retriever (#5114)
Co-authored-by: vempaliakhil96 <vempaliakhil96@gmail.com>
2023-05-24 10:02:09 -07:00
Shukri
b00c77dc62 Improve weaviate vectorstore docs (#5201)
# Improve weaviate vectorstore docs
2023-05-24 09:31:48 -07:00
Tomaz Bratanic
fd866d1801 Update Cypher QA prompt (#5173)
# Improve Cypher QA prompt

The current QA prompt is optimized for networkX answer generation, which
returns all the possible triples.
However, Cypher search is a bit more focused and doesn't necessary
return all the context information.
Due to that reason, the model sometimes refuses to generate an answer
even though the information is provided:

![Screenshot from 2023-05-24
08-36-23](https://github.com/hwchase17/langchain/assets/19948365/351cf9c1-2567-447c-91fd-284ae3fa1ccf)


To fix this issue, I have updated the prompt. Interestingly, I tried
many variations with less instructions and they didn't work properly.
However, the current fix works nicely.
![Screenshot from 2023-05-24
08-37-25](https://github.com/hwchase17/langchain/assets/19948365/fc830603-e6ec-4a23-8a86-eaf572996014)
2023-05-24 08:31:30 -07:00
Zach Schillaci
aa14e223ee Reuse length_func in MapReduceDocumentsChain (#5181)
# Reuse `length_func` in `MapReduceDocumentsChain`

Pretty straightforward refactor in `MapReduceDocumentsChain`. Reusing
the local variable `length_func`, instead of the longer alternative
`self.combine_document_chain.prompt_length`.

@hwchase17
2023-05-24 08:28:37 -07:00
Harrison Chase
11c26ebb55 Harrison/modelscope (#5156)
Co-authored-by: thomas-yanxin <yx20001210@163.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 08:06:45 -07:00
Davis Chase
2d5588c5f0 bump 179 (#5200) 2023-05-24 07:55:27 -07:00
Saba Sturua
47e4ee4370 adjust docarray docstrings (#5185)
Follow up of https://github.com/hwchase17/langchain/pull/5015

Thanks for catching this! 

Just a small PR to adjust couple of strings to these changes

Signed-off-by: jupyterjazz <saba.sturua@jina.ai>
2023-05-24 07:50:35 -07:00
Jeff Vestal
cf19a2a59f example usage (#5182)
Adding example usage for elasticsearch knn embeddings
[per](https://github.com/hwchase17/langchain/pull/3401#issuecomment-1548518389)


https://github.com/hwchase17/langchain/blob/master/langchain/embeddings/elasticsearch.py
2023-05-24 07:47:15 -07:00
Ikko Eltociear Ashimine
fff21a0b35 Update rellm_experimental.ipynb (#5189)
# Your PR Title (What it does)

HuggingFace -> Hugging Face
2023-05-24 11:41:00 +00:00
Nolan Tremelling
faa26650c9 Beam (#4996)
# Beam

Calls the Beam API wrapper to deploy and make subsequent calls to an
instance of the gpt2 LLM in a cloud deployment. Requires installation of
the Beam library and registration of Beam Client ID and Client Secret.
Additional calls can then be made through the instance of the large
language model in your code or by calling the Beam API.

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 01:25:18 -07:00
Ofer Mendelevitch
c81fb88035 Vectara (#5069)
# Vectara Integration

This PR provides integration with Vectara. Implemented here are:
* langchain/vectorstore/vectara.py
* tests/integration_tests/vectorstores/test_vectara.py
* langchain/retrievers/vectara_retriever.py
And two IPYNB notebooks to do more testing:
* docs/modules/chains/index_examples/vectara_text_generation.ipynb
* docs/modules/indexes/vectorstores/examples/vectara.ipynb

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 01:24:58 -07:00
Jason Bosco
9c4b43b494 Add Typesense vector store (#1674)
Closes #931.

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-23 23:20:45 -07:00
Leonid Ganeline
33929489b9 docs: added missed document_loaders examples (#5150)
# DOCS added missed document_loader examples

Added missed examples: `JSON`, `Open Document Format (ODT)`,
`Wikipedia`, `tomarkdown`.
Updated them to a consistent format.

## Who can review?

@hwchase17 
@dev2049
2023-05-23 21:56:41 -07:00
Daniel Quinteros
c111134a55 Clarification of the reference to the "get_text_legth" function in ge… (#5154)
# Clarification of the reference to the "get_text_legth" function in
getting_started.md

Reference to the function "get_text_legth" in the documentation did not
make sense. Comment added for clarification.

@hwchase17
2023-05-23 20:43:38 -07:00
Daniel Quinteros
de4ef24f75 Docs: updated getting_started.md (#5151)
# Docs: updated getting_started.md

Just accommodating some unnecessary spaces in the example of "pass few
shot examples to a prompt template".

@vowelparrot
2023-05-23 20:43:26 -07:00
mbchang
b1b7f3541c fix: fix current_time=Now bug for aadd_documents in TimeWeightedRetriever (#5155)
# Same as PR #5045, but for async

<!--
Thank you for contributing to LangChain! Your PR will appear in our next
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.
-->

<!-- Remove if not applicable -->

Fixes #4825 

I had forgotten to update the asynchronous counterpart `aadd_documents`
with the bug fix from PR #5045, so this PR also fixes `aadd_documents`
too.

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:
@dev2049

<!-- For a quicker response, figure out the right person to tag with @

        @hwchase17 - project lead

        Tracing / Callbacks
        - @agola11

        Async
        - @agola11

        DataLoaders
        - @eyurtsev

        Models
        - @hwchase17
        - @agola11

        Agents / Tools / Toolkits
        - @vowelparrot
        
        VectorStores / Retrievers / Memory
        - @dev2049
        
 -->
2023-05-23 20:31:45 -07:00
Jeremiah Lowin
925dd3e59e Add async versions of predict() and predict_messages() (#4867)
# Add async versions of predict() and predict_messages()

#4615 introduced a unifying interface for "base" and "chat" LLM models
via the new `predict()` and `predict_messages()` methods that allow both
types of models to operate on string and message-based inputs,
respectively.

This PR adds async versions of the same (`apredict()` and
`apredict_messages()`) that are identical except for their use of
`agenerate()` in place of `generate()`, which means they repurpose all
existing work on the async backend.


## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:
        @hwchase17 (follows his work on #4615)
        @agola11 (async)

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2023-05-23 17:22:49 -07:00
Junlin Zhou
9242998db1 Empty check before pop (#4929)
# Check whether 'other' is empty before popping

This PR could fix a potential 'popping empty set' error.

Co-authored-by: Junlin Zhou <jlzhou@zjuici.com>
2023-05-23 16:46:50 -07:00
Daniel King
de6e6c764e Add MosaicML inference endpoints (#4607)
# Add MosaicML inference endpoints
This PR adds support in langchain for MosaicML inference endpoints. We
both serve a select few open source models, and allow customers to
deploy their own models using our inference service. Docs are here
(https://docs.mosaicml.com/en/latest/inference.html), and sign up form
is here (https://forms.mosaicml.com/demo?utm_source=langchain). I'm not
intimately familiar with the details of langchain, or the contribution
process, so please let me know if there is anything that needs fixing or
this is the wrong way to submit a new integration, thanks!

I'm also not sure what the procedure is for integration tests. I have
tested locally with my api key.

## Who can review?
@hwchase17

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2023-05-23 15:59:08 -07:00
Adheeban Manoharan
68f0d45485 Adding Weather Loader (#5056)
Co-authored-by: Tyler Hutcherson <tyler.hutcherson@redis.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-23 15:57:33 -07:00
Jeff Vestal
0b542a9706 Add ElasticsearchEmbeddings class for generating embeddings using Elasticsearch models (#3401)
This PR introduces a new module, `elasticsearch_embeddings.py`, which
provides a wrapper around Elasticsearch embedding models. The new
ElasticsearchEmbeddings class allows users to generate embeddings for
documents and query texts using a [model deployed in an Elasticsearch
cluster](https://www.elastic.co/guide/en/machine-learning/current/ml-nlp-model-ref.html#ml-nlp-model-ref-text-embedding).

### Main features:

1. The ElasticsearchEmbeddings class initializes with an Elasticsearch
connection object and a model_id, providing an interface to interact
with the Elasticsearch ML client through
[infer_trained_model](https://elasticsearch-py.readthedocs.io/en/v8.7.0/api.html?highlight=trained%20model%20infer#elasticsearch.client.MlClient.infer_trained_model)
.
2. The `embed_documents()` method generates embeddings for a list of
documents, and the `embed_query()` method generates an embedding for a
single query text.
3. The class supports custom input text field names in case the deployed
model expects a different field name than the default `text_field`.
4. The implementation is compatible with any model deployed in
Elasticsearch that generates embeddings as output.

### Benefits:

1. Simplifies the process of generating embeddings using Elasticsearch
models.
2. Provides a clean and intuitive interface to interact with the
Elasticsearch ML client.
3. Allows users to easily integrate Elasticsearch-generated embeddings.

Related issue https://github.com/hwchase17/langchain/issues/3400

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-23 14:50:33 -07:00
Theodore Rolle
754b5133e9 Improve PlanningOutputParser whitespace handling (#5143)
Some LLM's will produce numbered lists with leading whitespace, i.e. in
response to "What is the sum of 2 and 3?":
```
Plan:
  1. Add 2 and 3.
  2. Given the above steps taken, please respond to the users original question.
```
This commit updates the PlanningOutputParser regex to ignore leading
whitespace before the step number, enabling it to correctly parse this
format.
2023-05-23 12:47:26 -07:00
Tommaso De Lorenzo
5002f3ae35 solving #2887 (#5127)
# Allowing openAI fine-tuned models
Very simple fix that checks whether a openAI `model_name` is a
fine-tuned model when loading `context_size` and when computing call's
cost in the `openai_callback`.

Fixes #2887 
---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-23 11:18:03 -07:00
Myeongseop Kim
7a75bb2121 docs: fix minor typo + add wikipedia package installation part in human_input_llm.ipynb (#5118)
# Fix typo + add wikipedia package installation part in
human_input_llm.ipynb
This PR
1. Fixes typo ("the the human input LLM"), 
2. Addes wikipedia package installation part (in accordance with
`WikipediaQueryRun`
[documentation](https://python.langchain.com/en/latest/modules/agents/tools/examples/wikipedia.html))

in `human_input_llm.ipynb`
(`docs/modules/models/llms/examples/human_input_llm.ipynb`)
2023-05-23 10:59:30 -07:00
Davis Chase
753f4cfc26 bump 178 (#5130) 2023-05-23 07:43:56 -07:00
Ayan Bandyopadhyay
5c87dbf5a8 Add link to Psychic from document loaders documentation page (#5115)
# Add link to Psychic from document loaders documentation page

In my previous PR I forgot to update `document_loaders.rst` to link to
`psychic.ipynb` to make it discoverable from the main documentation.
2023-05-23 06:47:23 -07:00
Tian Wei
d7f807b71f Add AzureCognitiveServicesToolkit to call Azure Cognitive Services API (#5012)
# Add AzureCognitiveServicesToolkit to call Azure Cognitive Services
API: achieve some multimodal capabilities

This PR adds a toolkit named AzureCognitiveServicesToolkit which bundles
the following tools:
- AzureCogsImageAnalysisTool: calls Azure Cognitive Services image
analysis API to extract caption, objects, tags, and text from images.
- AzureCogsFormRecognizerTool: calls Azure Cognitive Services form
recognizer API to extract text, tables, and key-value pairs from
documents.
- AzureCogsSpeech2TextTool: calls Azure Cognitive Services speech to
text API to transcribe speech to text.
- AzureCogsText2SpeechTool: calls Azure Cognitive Services text to
speech API to synthesize text to speech.

This toolkit can be used to process image, document, and audio inputs.
---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-23 06:45:48 -07:00
Jamie Broomall
d4fd589638 WhyLabs callback (#4906)
# Add a WhyLabs callback handler

* Adds a simple WhyLabsCallbackHandler
* Add required dependencies as optional
* protect against missing modules with imports
* Add docs/ecosystem basic example

based on initial prototype from @andrewelizondo

> this integration gathers privacy preserving telemetry on text with
whylogs and sends stastical profiles to WhyLabs platform to monitoring
these metrics over time. For more information on what WhyLabs is see:
https://whylabs.ai

After you run the notebook (if you have env variables set for the API
Keys, org_id and dataset_id) you get something like this in WhyLabs:
![Screenshot
(443)](https://github.com/hwchase17/langchain/assets/88007022/6bdb3e1c-4243-4ae8-b974-23a8bb12edac)

Co-authored-by: Andre Elizondo <andre@whylabs.ai>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 20:29:47 -07:00
Eugene Yurtsev
d56313acba Improve effeciency of TextSplitter.split_documents, iterate once (#5111)
# Improve TextSplitter.split_documents, collect page_content and
metadata in one iteration

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:

@eyurtsev In the case where documents is a generator that can only be
iterated once making this change is a huge help. Otherwise a silent
issue happens where metadata is empty for all documents when documents
is a generator. So we expand the argument from `List[Document]` to
`Union[Iterable[Document], Sequence[Document]]`

---------

Co-authored-by: Steven Tartakovsky <tartakovsky.developer@gmail.com>
2023-05-22 23:00:24 -04:00
Jettro Coenradie
b950022894 Fixes issue #5072 - adds additional support to Weaviate (#5085)
Implementation is similar to search_distance and where_filter

# adds 'additional' support to Weaviate queries

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 18:57:10 -07:00
Zander Chase
87bba2e8d3 Pass Dataset Name by Name not Position (#5108)
Pass dataset name by name
2023-05-23 01:21:39 +00:00
Matt Rickard
de6a401a22 Add OpenLM LLM multi-provider (#4993)
OpenLM is a zero-dependency OpenAI-compatible LLM provider that can call
different inference endpoints directly via HTTP. It implements the
OpenAI Completion class so that it can be used as a drop-in replacement
for the OpenAI API. This changeset utilizes BaseOpenAI for minimal added
code.

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 18:09:53 -07:00
Gergely Imreh
69de33e024 Add Mastodon toots loader (#5036)
# Add Mastodon toots loader.

Loader works either with public toots, or Mastodon app credentials. Toot
text and user info is loaded.

I've also added integration test for this new loader as it works with
public data, and a notebook with example output run now.

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 16:43:07 -07:00
mbchang
e173e032bc fix: assign current_time to datetime.now() if current_time is None (#5045)
# Assign `current_time` to `datetime.now()` if it `current_time is None`
in `time_weighted_retriever`

Fixes #4825 

As implemented, `add_documents` in `TimeWeightedVectorStoreRetriever`
assigns `doc.metadata["last_accessed_at"]` and
`doc.metadata["created_at"]` to `datetime.datetime.now()` if
`current_time` is not in `kwargs`.
```python
    def add_documents(self, documents: List[Document], **kwargs: Any) -> List[str]:
        """Add documents to vectorstore."""
        current_time = kwargs.get("current_time", datetime.datetime.now())
        # Avoid mutating input documents
        dup_docs = [deepcopy(d) for d in documents]
        for i, doc in enumerate(dup_docs):
            if "last_accessed_at" not in doc.metadata:
                doc.metadata["last_accessed_at"] = current_time
            if "created_at" not in doc.metadata:
                doc.metadata["created_at"] = current_time
            doc.metadata["buffer_idx"] = len(self.memory_stream) + i
        self.memory_stream.extend(dup_docs)
        return self.vectorstore.add_documents(dup_docs, **kwargs)
``` 
However, from the way `add_documents` is being called from
`GenerativeAgentMemory`, `current_time` is set as a `kwarg`, but it is
given a value of `None`:
```python
    def add_memory(
        self, memory_content: str, now: Optional[datetime] = None
    ) -> List[str]:
        """Add an observation or memory to the agent's memory."""
        importance_score = self._score_memory_importance(memory_content)
        self.aggregate_importance += importance_score
        document = Document(
            page_content=memory_content, metadata={"importance": importance_score}
        )
        result = self.memory_retriever.add_documents([document], current_time=now)
```
The default of `now` was set in #4658 to be None. The proposed fix is
the following:
```python
    def add_documents(self, documents: List[Document], **kwargs: Any) -> List[str]:
        """Add documents to vectorstore."""
        current_time = kwargs.get("current_time", datetime.datetime.now())
        # `current_time` may exist in kwargs, but may still have the value of None.
        if current_time is None:
            current_time = datetime.datetime.now()
```
Alternatively, we could just set the default of `now` to be
`datetime.datetime.now()` everywhere instead. Thoughts @hwchase17? If we
still want to keep the default to be `None`, then this PR should fix the
above issue. If we want to set the default to be
`datetime.datetime.now()` instead, I can update this PR with that
alternative fix. EDIT: seems like from #5018 it looks like we would
prefer to keep the default to be `None`, in which case this PR should
fix the error.
2023-05-22 15:47:03 -07:00
Leonid Ganeline
c28cc0f1ac changed ValueError to ImportError (#5103)
# changed ValueError to ImportError

Code cleaning.
Fixed inconsistencies in ImportError handling. Sometimes it raises
ImportError and sometime ValueError.
I've changed all cases to the `raise ImportError`
Also:
- added installation instruction in the error message, where it missed;
- fixed several installation instructions in the error message;
- fixed several error handling in regards to the ImportError
2023-05-22 15:24:45 -07:00
venetisgr
5e47c648ed Update serpapi.py (#4947)
Added link option in  _process_response

<!--
In _process_respons "snippet" provided non working links for the case
that "links" had the correct answer. Thus added an elif statement before
snippet
-->

<!-- Remove if not applicable -->

Fixes # (issue)
In _process_response link provided correct answers while the snippet
reply provided non working links

@vowelparrot 
## Before submitting

<!-- If you're adding a new integration, include an integration test and
an example notebook showing its use! -->

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:

<!-- For a quicker response, figure out the right person to tag with @

        @hwchase17 - project lead

        Tracing / Callbacks
        - @agola11

        Async
        - @agola11

        DataLoaders
        - @eyurtsev

        Models
        - @hwchase17
        - @agola11

        Agents / Tools / Toolkits
        - @vowelparrot
        
        VectorStores / Retrievers / Memory
        - @dev2049
        
 -->

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 13:34:36 -07:00
Ankit Arya
5b2b436fab Fixed import error for AutoGPT e.g. from langchain.experimental.auton… (#5101)
`from langchain.experimental.autonomous_agents.autogpt.agent import
AutoGPT` results in an import error as AutoGPT is not defined in the
__init__.py file

https://python.langchain.com/en/latest/use_cases/autonomous_agents/marathon_times.html

An Alternate, way would be to be directly update the import statement to
be `from langchain.experimental import AutoGPT`

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 13:26:25 -07:00
Ankush Gola
467ca6f025 update langchainplus client and docker file to reflect port changes (#5005)
# Currently, only the dev images are updated
2023-05-22 12:53:05 -07:00
Shawn91
9e649462ce fix: add_texts method of Weaviate vector store creats wrong embeddings (#4933)
# fix a bug in the add_texts method of Weaviate vector store that creats
wrong embeddings

The following is the original code in the `add_texts` method of the
Weaviate vector store, from line 131 to 153, which contains a bug. The
code here includes some extra explanations in the form of comments and
some omissions.

```python
            for i, doc in enumerate(texts):

                # some code omitted

                if self._embedding is not None:
                    # variable texts is a list of string and doc here is just a string. 
                    # list(doc) actually breaks up the string into characters.
                    # so, embeddings[0] is just the embedding of the first character
                    embeddings = self._embedding.embed_documents(list(doc))
                    batch.add_data_object(
                        data_object=data_properties,
                        class_name=self._index_name,
                        uuid=_id,
                        vector=embeddings[0],
                    )
```

To fix this bug, I pulled the embedding operation out of the for loop
and embed all texts at once.

Co-authored-by: Shawn91 <zyx199199@qq.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 12:35:52 -07:00
Eduard van Valkenburg
1cb04f2b26 PowerBI major refinement in working of tool and tweaks in the rest (#5090)
# PowerBI major refinement in working of tool and tweaks in the rest

I've gained some experience with more complex sets and the earlier
implementation had too many tries by the agent to create DAX, so
refactored the code to run the LLM to create dax based on a question and
then immediately run the same against the dataset, with retries and a
prompt that includes the error for the retry. This works much better!

Also did some other refactoring of the inner workings, making things
clearer, more concise and faster.
2023-05-22 11:58:28 -07:00
hwaking
e57ebf3922 add get_top_k_cosine_similarity method to get max top k score and index (#5059)
# Row-wise cosine similarity between two equal-width matrices and return
the max top_k score and index, the score all greater than
threshold_score.

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 11:55:48 -07:00
Donger
039f8f1abb Add the usage of SSL certificates for Elasticsearch and user password authentication (#5058)
Enhance the code to support SSL authentication for Elasticsearch when
using the VectorStore module, as previous versions did not provide this
capability.
@dev2049

---------

Co-authored-by: caidong <zhucaidong1992@gmail.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 11:51:32 -07:00
Andreas Liebschner
44dc959584 Improve pinecone hybrid search retriever adding metadata support (#5098)
# Improve pinecone hybrid search retriever adding metadata support

I simply remove the hardwiring of metadata to the existing
implementation allowing one to pass `metadatas` attribute to the
constructors and in `get_relevant_documents`. I also add one missing pip
install to the accompanying notebook (I am not adding dependencies, they
were pre-existing).

First contribution, just hoping to help, feel free to critique :) 
my twitter username is `@andreliebschner`

While looking at hybrid search I noticed #3043 and #1743. I think the
former can be closed as following the example right now (even prior to
my improvements) works just fine, the latter I think can be also closed
safely, maybe pointing out the relevant classes and example. Should I
reply those issues mentioning someone?

@dev2049, @hwchase17

---------

Co-authored-by: Andreas Liebschner <a.liebschner@shopfully.com>
2023-05-22 11:42:54 -07:00
Deepak S V
5cd12102be Improving Resilience of MRKL Agent (#5014)
This is a highly optimized update to the pull request
https://github.com/hwchase17/langchain/pull/3269

Summary:
1) Added ability to MRKL agent to self solve the ValueError(f"Could not
parse LLM output: `{llm_output}`") error, whenever llm (especially
gpt-3.5-turbo) does not follow the format of MRKL Agent, while returning
"Action:" & "Action Input:".
2) The way I am solving this error is by responding back to the llm with
the messages "Invalid Format: Missing 'Action:' after 'Thought:'" &
"Invalid Format: Missing 'Action Input:' after 'Action:'" whenever
Action: and Action Input: are not present in the llm output
respectively.

For a detailed explanation, look at the previous pull request.

New Updates:
1) Since @hwchase17 , requested in the previous PR to communicate the
self correction (error) message, using the OutputParserException, I have
added new ability to the OutputParserException class to store the
observation & previous llm_output in order to communicate it to the next
Agent's prompt. This is done, without breaking/modifying any of the
functionality OutputParserException previously performs (i.e.
OutputParserException can be used in the same way as before, without
passing any observation & previous llm_output too).

---------

Co-authored-by: Deepak S V <svdeepak99@users.noreply.github.com>
2023-05-22 11:08:08 -07:00
Michael Landis
6eacd88ae7 fix: revert docarray explicit transitive dependencies and use extras instead (#5015)
tldr: The docarray [integration
PR](https://github.com/hwchase17/langchain/pull/4483) introduced a
pinned dependency to protobuf. This is a docarray dependency, not a
langchain dependency. Since this is handled by the docarray
dependencies, it is unnecessary here.

Further, as a pinned dependency, this quickly leads to incompatibilities
with application code that consumes the library. Much less with a
heavily used library like protobuf.

Detail: as we see in the [docarray

integration](https://github.com/hwchase17/langchain/pull/4483/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R81-R83),
the transitive dependencies of docarray were also listed as langchain
dependencies. This is unnecessary as the docarray project has an
appropriate
[extras](a01a05542d/pyproject.toml (L70)).
The docarray project also does not require this _pinned_ version of
protobuf, rather [a minimum
version](a01a05542d/pyproject.toml (L41)).
So this pinned version was likely in error.

To fix this, this PR reverts the explicit hnswlib and protobuf
dependencies and adds the hnswlib extras install for docarray (which
installs hnswlib and protobuf, as originally intended). Because version
`0.32.0`
of the docarray hnswlib extras added protobuf, we bump the docarray
dependency from `^0.31.0` to `^0.32.0`.

# revert docarray explicit transitive dependencies and use extras
instead

## Who can review?

@dev2049 -- reviewed the original PR
@eyurtsev -- bumped the pinned protobuf dependency a few days ago

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 12:48:09 -04:00
Davis Chase
fcd88bccb3 Bump 177 (#5095) 2023-05-22 08:19:06 -07:00
Harrison Chase
10ba201d05 Harrison/neo4j (#5078)
Co-authored-by: Tomaz Bratanic <bratanic.tomaz@gmail.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-22 07:31:48 -07:00
Deepak S V
49ca02711e Improved query, print & exception handling in REPL Tool (#4997)
Update to pull request https://github.com/hwchase17/langchain/pull/3215

Summary:
1) Improved the sanitization of query (using regex), by removing python
command (since gpt-3.5-turbo sometimes assumes python console as a
terminal, and runs python command first which causes error). Also
sometimes 1 line python codes contain single backticks.
2) Added 7 new test cases.

For more details, view the previous pull request.

---------

Co-authored-by: Deepak S V <svdeepak99@users.noreply.github.com>
2023-05-22 13:43:44 +00:00
Zander Chase
785502edb3 Add 'get_token_ids' method (#4784)
Let user inspect the token ids in addition to getting th enumber of tokens

---------

Co-authored-by: Zach Schillaci <40636930+zachschillaci27@users.noreply.github.com>
2023-05-22 13:17:26 +00:00
Zander Chase
ef7d015be5 Separate Runner Functions from Client (#5079)
Extract the methods specific to running an LLM or Chain on a dataset to
separate utility functions.

This simplifies the client a bit and lets us separate concerns of LCP
details from running examples (e.g., for evals)
2023-05-22 05:28:47 +00:00
Leonid Ganeline
443ebe22f4 docs: Deployments page moved into Ecosystem/ (#4949)
# docs: `deployments` page moved into `ecosystem/`

The `Deployments` page moved into the `Ecosystem/` group

Small fixes:
- `index` page: fixed order of items in the `Modules` list, in the `Use
Cases` list
- item `References/Installation` was lost in the `index` page (not on
the Navbar!). Restored it.
- added `|` marker in several places.

NOTE: I also thought about moving the `Additional Resources/Gallery`
page into the `Ecosystem` group but decided to leave it unchanged.
Please, advise on this.

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:
@dev2049
2023-05-21 21:18:22 -07:00
Hans van Dam
a395ff7c90 preserve language in conversation retrieval (#4969)
Without the addition of 'in its original language', the condensing
response, more often than not, outputs the rephrased question in
English, even when the conversation is in another language. This
question in English then transfers to the question in the retrieval
prompt and the chatbot is stuck in English.

I'm sometimes surprised that this does not happen more often, but
apparently the GPT models are smart enough to understand that when the
template contains

Question: ....
Answer:

then the answer should be in in the language of the question.
2023-05-21 21:16:03 -07:00
Matt Robinson
bf3f554357 feat: batch multiple files in a single Unstructured API request (#4525)
### Submit Multiple Files to the Unstructured API

Enables batching multiple files into a single Unstructured API requests.
Support for requests with multiple files was added to both
`UnstructuredAPIFileLoader` and `UnstructuredAPIFileIOLoader`. Note that
if you submit multiple files in "single" mode, the result will be
concatenated into a single document. We recommend using this feature in
"elements" mode.

### Testing

The following should load both documents, using two of the example docs
from the integration tests folder.

```python
    from langchain.document_loaders import UnstructuredAPIFileLoader

    file_paths = ["examples/layout-parser-paper.pdf",  "examples/whatsapp_chat.txt"]

    loader = UnstructuredAPIFileLoader(
        file_paths=file_paths,
        api_key="FAKE_API_KEY",
        strategy="fast",
        mode="elements",
    )
    docs = loader.load()
```
2023-05-21 20:48:20 -07:00
Harrison Chase
0c3de0a0b3 Merge branch 'master' of github.com:hwchase17/langchain 2023-05-21 09:22:43 -07:00
Harrison Chase
224f73e978 move docs 2023-05-21 09:22:35 -07:00
Harrison Chase
6c25f860fd bump to 176 (#5064) 2023-05-21 09:19:25 -07:00
Harrison Chase
b0431c672b Harrison/psychic (#5063)
Co-authored-by: Ayan Bandyopadhyay <ayanb9440@gmail.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-21 09:13:20 -07:00
Harrison Chase
8c661baefb change to type checking (#5062) 2023-05-21 09:09:49 -07:00
Jeffrey Zheng
424a573266 DOC: Misspelling in agents.rst documentation (#5038)
# Corrected Misspelling in agents.rst Documentation

<!--
Thank you for contributing to LangChain! Your PR will appear in our next
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get
-->

In the
[documentation](https://python.langchain.com/en/latest/modules/agents.html)
it says "in fact, it is often best to have an Action Agent be in
**change** of the execution for the Plan and Execute agent."

**Suggested Change:** I propose correcting change to charge.

Fix for issue: #5039
2023-05-20 22:24:08 -07:00
Gengliang Wang
f9f08c4b69 Add documentation for Databricks integration (#5013)
# Add documentation for Databricks integration

This is a follow-up of https://github.com/hwchase17/langchain/pull/4702
It documents the details of how to integrate Databricks using langchain.
It also provides examples in a notebook.


## Who can review?
@dev2049 @hwchase17 since you are aware of the context. We will promote
the integration after this doc is ready. Thanks in advance!
2023-05-20 22:06:24 -07:00
tornikeo
a6ef20d7fe Fix annoying typo in docs (#5029)
# Fixes an annoying typo in docs

<!--
Thank you for contributing to LangChain! Your PR will appear in our next
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.
-->

<!-- Remove if not applicable -->

Fixes Annoying typo in docs - "Therefor" -> "Therefore". It's so
annoying to read that I just had to make this PR.
2023-05-20 22:02:21 -07:00
Davis Chase
9d1280d451 bump v175 (#5041) 2023-05-20 09:24:17 -07:00
UmerHA
7388248b3e Streaming only final output of agent (#2483) (#4630)
# Streaming only final output of agent (#2483)
As requested in issue #2483, this Callback allows to stream only the
final output of an agent (ie not the intermediate steps).

Fixes #2483

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-20 09:20:17 -07:00
Davis Chase
3bc0bf0079 fix prompt saving (#4987)
will add unit tests
2023-05-20 08:21:52 -07:00
Zander Chase
27e63b977a Add logs command (#5007)
to the plus server
2023-05-20 00:06:17 +00:00
Marcus Winter
2aa3754024 Check for single prompt in __call__ method of the BaseLLM class (#4892)
# Ensuring that users pass a single prompt when calling a LLM 

- This PR adds a check to the `__call__` method of the `BaseLLM` class
to ensure that it is called with a single prompt
- Raises a `ValueError` if users try to call a LLM with a list of prompt
and instructs them to use the `generate` method instead

## Why this could be useful

I stumbled across this by accident. I accidentally called the OpenAI LLM
with a list of prompts instead of a single string and still got a
result:

```
>>> from langchain.llms import OpenAI
>>> llm = OpenAI()
>>> llm(["Tell a joke"]*2)
"\n\nQ: Why don't scientists trust atoms?\nA: Because they make up everything!"
```

It might be better to catch such a scenario preventing unnecessary costs
and irritation for the user.

## Proposed behaviour

```
>>> from langchain.llms import OpenAI
>>> llm = OpenAI()
>>> llm(["Tell a joke"]*2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/marcus/Projects/langchain/langchain/llms/base.py", line 291, in __call__
    raise ValueError(
ValueError: Argument `prompt` is expected to be a single string, not a list. If you want to run the LLM on multiple prompts, use `generate` instead.
```
2023-05-19 16:54:26 -07:00
domchan
6c60251f52 Add self query translator for weaviate vectorstore (#4804)
# Add self query translator for weaviate vectorstore

Adds support for the EQ comparator and the AND/OR operators. 

Co-authored-by: Dominic Chan <dchan@cppib.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-19 16:41:12 -07:00
Davis Chase
9928fb2193 Revert "API update: Engines -> Models (#4915)" (#5008)
This reverts commit 8c28ad6dac.

Seems to be causing #5001
2023-05-19 16:38:08 -07:00
SimFG
f07b9fde74 Update the GPTCache example (#4985)
# Update the GPTCache example

Fixes #4757
2023-05-19 16:35:36 -07:00
Leonid Ganeline
ddc2d4c21e added instruction about pip install google-gerativeai (#5004)
# added instruction about pip install google-gerativeai

added instruction about pip install google-gerativeai
2023-05-19 15:32:24 -07:00
Nicolas
02632d52b3 docs: Big Mendable Improvements (#4964)
- Higher accuracy on the responses
- New redesigned UI
- Pretty Sources: display the sources by title / sub-section instead of
long URL.
- Fixed Reset Button bugs and some other UI issues
- Other tweaks
2023-05-19 15:31:48 -07:00
Leonid Ganeline
2ab0e1d526 changed ValueError to ImportError (#5006)
# changed ValueError to ImportError in except

Several places with this bug. ValueError does not catch ImportError.
2023-05-19 15:28:08 -07:00
Davis Chase
080eb1b3fc Fix graphql tool (#4984)
Fix construction and add unit test.
2023-05-19 15:27:50 -07:00
Mike McGarry
ddd595fe81 feature/4493 Improve Evernote Document Loader (#4577)
# Improve Evernote Document Loader

When exporting from Evernote you may export more than one note.
Currently the Evernote loader concatenates the content of all notes in
the export into a single document and only attaches the name of the
export file as metadata on the document.

This change ensures that each note is loaded as an independent document
and all available metadata on the note e.g. author, title, created,
updated are added as metadata on each document.

It also uses an existing optional dependency of `html2text` instead of
`pypandoc` to remove the need to download the pandoc application via
`download_pandoc()` to be able to use the `pypandoc` python bindings.

Fixes #4493 

Co-authored-by: Mike McGarry <mike.mcgarry@finbourne.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-19 14:28:17 -07:00
Juanma Tristancho
729e935ea4 PGVector logger message level (#4920)
# Change the logger message level

The library is logging at `error` level a situation that is not an
error.
We noticed this error in our logs, but from our point of view it's an
expected behavior and the log level should be `warning`.
2023-05-19 14:01:26 -07:00
Peng Wang
62d0a01a0f Update python.py (#4971)
# Delete a useless "print"
2023-05-19 13:57:16 -07:00
Eugene Yurtsev
0ff59569dc Adds 'IN' metadata filter for pgvector for checking set presence (#4982)
# Adds "IN" metadata filter for pgvector to all checking for set
presence

PGVector currently supports metadata filters of the form:
```
{"filter": {"key": "value"}}
```
which will return documents where the "key" metadata field is equal to
"value".

This PR adds support for metadata filters of the form:
```
{"filter": {"key": { "IN" : ["list", "of", "values"]}}}
```

Other vector stores support this via an "$in" syntax. I chose to use
"IN" to match postgres' syntax, though happy to switch.
Tested locally with PGVector and ChatVectorDBChain.


@dev2049

---------

Co-authored-by: jade@spanninglabs.com <jade@spanninglabs.com>
2023-05-19 13:53:23 -07:00
Davis Chase
56cb77a828 Make test gha workflow manually runnable (#4998)
if https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
is to be believed this should make it possible to manually kick of test
workflow, but i don't know much about these things
2023-05-19 13:46:33 -07:00
Jiaping(JP) Zhang
22d844dc07 Add async search with relevance score (#4558)
Add the async version for the search with relevance score

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-19 13:05:24 -07:00
Adheeban Manoharan
616e9a93e0 Bug fixes and error handling in Redis - Vectorstore (#4932)
# Bug fixes in Redis - Vectorstore (Added the version of redis to the
error message and removed the cls argument from a classmethod)


Co-authored-by: Tyler Hutcherson <tyler.hutcherson@redis.com>
2023-05-19 13:02:03 -07:00
Gengliang Wang
a87a2524c7 Remove autoreload in examples (#4994)
# Remove autoreload in examples
Remove the `autoreload` in examples since it is not necessary for most
users:
```
%load_ext autoreload,
%autoreload 2
```
2023-05-19 17:35:58 +00:00
Davis Chase
2abf6b9f17 bump v0.0.174 (#4988) 2023-05-19 09:34:28 -07:00
Eugene Yurtsev
06e524416c power bi api wrapper integration tests & bug fix (#4983)
# Powerbi API wrapper bug fix + integration tests

- Bug fix by removing `TYPE_CHECKING` in in utilities/powerbi.py
- Added integration test for power bi api in
utilities/test_powerbi_api.py
- Added integration test for power bi agent in
agent/test_powerbi_agent.py
- Edited .env.examples to help set up power bi related environment
variables
- Updated demo notebook with working code in
docs../examples/powerbi.ipynb - AzureOpenAI -> ChatOpenAI

Notes: 

Chat models (gpt3.5, gpt4) are much more capable than davinci at writing
DAX queries, so that is important to getting the agent to work properly.
Interestingly, gpt3.5-turbo needed the examples=DEFAULT_FEWSHOT_EXAMPLES
to write consistent DAX queries, so gpt4 seems necessary as the smart
llm.

Fixes #4325

## Before submitting

Azure-core and Azure-identity are necessary dependencies

check integration tests with the following:
`pytest tests/integration_tests/utilities/test_powerbi_api.py`
`pytest tests/integration_tests/agent/test_powerbi_agent.py`

You will need a power bi account with a dataset id + table name in order
to test. See .env.examples for details.

## Who can review?
@hwchase17
@vowelparrot

---------

Co-authored-by: aditya-pethe <adityapethe1@gmail.com>
2023-05-19 11:25:52 -04:00
Viswanadh Rayavarapu
e68dfa7062 Update planner_prompt.py (#4967)
Typos in the OpenAPI agent Prompt.
2023-05-19 11:17:10 -04:00
Edrick Da Corte Henriquez
e80585bab0 Update tutorials.md (#4960)
# Added a YouTube Tutorial

Added a LangChain tutorial playlist aimed at onboarding newcomers to
LangChain and its use cases.

I've shared the video in the #tutorials channel and it seemed to be well
received. I think this could be useful to the greater community.

## Who can review?

@dev2049
2023-05-19 10:40:14 -04:00
Rahul Rao
13c376345e Fixed assumptions misspelling (#4961)
Fixed assumptions misspelling in the link mentioned below:-


https://python.langchain.com/en/latest/modules/chains/examples/llm_summarization_checker.html


![image](https://github.com/hwchase17/langchain/assets/16189966/94cf2be0-b3d0-495b-98ad-e1f44331727e)

Fix for Issue:- #4959 

@hwchase17
2023-05-19 10:40:04 -04:00
Gengliang Wang
bf5a3c6dec Support Databricks in SQLDatabase (#4702)
This PR adds support for Databricks runtime and Databricks SQL by using
[Databricks SQL Connector for
Python](https://docs.databricks.com/dev-tools/python-sql-connector.html).
As a cloud data platform, accessing Databricks requires a URL as follows

`databricks://token:{api_token}@{hostname}?http_path={http_path}&catalog={catalog}&schema={schema}`.

**The URL is **complicated** and it may take users a while to figure it
out**. Since the fields `api_token`/`hostname`/`http_path` fields are
known in the Databricks notebook, I am proposing a new method
`from_databricks` to simplify the connection to Databricks.

## In Databricks Notebook
After changes, Databricks users only need to specify the `catalog` and
`schema` field when using langchain.
<img width="881" alt="image"
src="https://github.com/hwchase17/langchain/assets/1097932/984b4c57-4c2d-489d-b060-5f4918ef2f37">

## In Jupyter Notebook
The method can be used on the local setup as well:
<img width="678" alt="image"
src="https://github.com/hwchase17/langchain/assets/1097932/142e8805-a6ef-4919-b28e-9796ca31ef19">
2023-05-19 00:42:06 -07:00
Harrison Chase
88a3a56c1a Add Spark SQL support (#4602) (#4956)
# Add Spark SQL support 
* Add Spark SQL support. It can connect to Spark via building a
local/remote SparkSession.
* Include a notebook example

I tried some complicated queries (window function, table joins), and the
tool works well.
Compared to the [Spark Dataframe

agent](https://python.langchain.com/en/latest/modules/agents/toolkits/examples/spark.html),
this tool is able to generate queries across multiple tables.

---------

# Your PR Title (What it does)

<!--
Thank you for contributing to LangChain! Your PR will appear in our next
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.
-->

<!-- Remove if not applicable -->

Fixes # (issue)

## Before submitting

<!-- If you're adding a new integration, include an integration test and
an example notebook showing its use! -->

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:

<!-- For a quicker response, figure out the right person to tag with @

        @hwchase17 - project lead

        Tracing / Callbacks
        - @agola11

        Async
        - @agola11

        DataLoaders
        - @eyurtsev

        Models
        - @hwchase17
        - @agola11

        Agents / Tools / Toolkits
        - @vowelparrot
        
        VectorStores / Retrievers / Memory
        - @dev2049
        
 -->

---------

Co-authored-by: Gengliang Wang <gengliang@apache.org>
Co-authored-by: Mike W <62768671+skcoirz@users.noreply.github.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: UmerHA <40663591+UmerHA@users.noreply.github.com>
Co-authored-by: 张城铭 <z@hyperf.io>
Co-authored-by: assert <zhangchengming@kkguan.com>
Co-authored-by: blob42 <spike@w530>
Co-authored-by: Yuekai Zhang <zhangyuekai@foxmail.com>
Co-authored-by: Richard He <he.yucheng@outlook.com>
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
Co-authored-by: Leonid Ganeline <leo.gan.57@gmail.com>
Co-authored-by: Alexey Nominas <60900649+Chae4ek@users.noreply.github.com>
Co-authored-by: elBarkey <elbarkey@gmail.com>
Co-authored-by: Davis Chase <130488702+dev2049@users.noreply.github.com>
Co-authored-by: Jeffrey D <1289344+verygoodsoftwarenotvirus@users.noreply.github.com>
Co-authored-by: so2liu <yangliu35@outlook.com>
Co-authored-by: Viswanadh Rayavarapu <44315599+vishwa-rn@users.noreply.github.com>
Co-authored-by: Chakib Ben Ziane <contact@blob42.xyz>
Co-authored-by: Daniel Chalef <131175+danielchalef@users.noreply.github.com>
Co-authored-by: Daniel Chalef <daniel.chalef@private.org>
Co-authored-by: Jari Bakken <jari.bakken@gmail.com>
Co-authored-by: escafati <scafatieugenio@gmail.com>
2023-05-18 20:53:08 -07:00
Harrison Chase
5feb60f426 Harrison/spell executor (#4914)
Co-authored-by: Jan Minar <rdancer@rdancer.org>
2023-05-18 20:43:33 -07:00
Aidan Boland
c06973261a Fix for syntax when setting search_path for Snowflake database (#4747)
# Fixes syntax for setting Snowflake database search_path

An error occurs when using a Snowflake database and providing a schema
argument.
I have updated the syntax to run a Snowflake specific query when the
database dialect is 'snowflake'.
2023-05-18 20:30:38 -07:00
Mike Wang
db6f7ed0ba [nit] Simplify Spark Creation Validation Check A Little Bit (#4761)
- simplify the validation check a little bit.
- re-tested in jupyter notebook.

Reviewer: @hwchase17
2023-05-18 18:57:54 -07:00
escafati
e027a38f33 NIT: Instead of hardcoding k in each definition, define it as a param above. (#2675)
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
Co-authored-by: Davis Chase <130488702+dev2049@users.noreply.github.com>
2023-05-18 17:35:31 -07:00
Jari Bakken
3df2d831f9 Fix get_num_tokens for Anthropic models (#4911)
The Anthropic classes used `BaseLanguageModel.get_num_tokens` because of
an issue with multiple inheritance. Fixed by moving the method from
`_AnthropicCommon` to both its subclasses.

This change will significantly speed up token counting for Anthropic
users.
2023-05-18 16:32:27 -07:00
Daniel Chalef
c8c2276ccb Zep Retriever - Vector Search Over Chat History (#4533)
# Zep Retriever - Vector Search Over Chat History with the Zep Long-term
Memory Service

More on Zep: https://github.com/getzep/zep

Note: This PR is related to and relies on
https://github.com/hwchase17/langchain/pull/4834. I did not want to
modify the `pyproject.toml` file to add the `zep-python` dependency a
second time.

Co-authored-by: Daniel Chalef <daniel.chalef@private.org>
2023-05-18 16:27:18 -07:00
Chakib Ben Ziane
5525b704cc Chatconv agent: output parser exception (#4923)
the output parser form chat conversational agent now raises
`OutputParserException` like the rest.

The `raise OutputParserExeption(...) from e` form also carries through
the original error details on what went wrong.

I added the `ValueError` as a base class to `OutputParserException` to
avoid breaking code that was relying on `ValueError` as a way to catch
exceptions from the agent. So catching ValuError still works. Not sure
if this is a good idea though ?
2023-05-18 16:20:35 -07:00
Leonid Ganeline
a9bb3147d7 docs: vectorstores, different updates and fixes (#4939)
# docs: vectorstores, different updates and fixes

Multiple updates:
- added/improved descriptions
- fixed header levels
- added headers
- fixed headers
2023-05-18 15:35:47 -07:00
Leonid Ganeline
8f8593aac5 docs: added ecosystem/dependents page (#4941)
# docs: added `ecosystem/dependents` page

Added `ecosystem/dependents` page. Can we propose a better page name?
2023-05-18 13:11:08 -07:00
Viswanadh Rayavarapu
c9f963e295 Update custom_multi_action_agent.ipynb (#4931)
Updated the docs from 
"An agent consists of three parts:" to 
"An agent consists of two parts:" since there are only two parts in the
documentation
2023-05-18 11:53:12 -07:00
so2liu
3002c1d508 fix: error in gptcache example nb (#4930) 2023-05-18 11:49:45 -07:00
Jeffrey D
7e8e21c914 Correct typo in APIChain example notebook (Farenheit -> Fahrenheit) (#4938)
Correct typo in APIChain example notebook (Farenheit -> Fahrenheit)
2023-05-18 11:48:02 -07:00
Leonid Ganeline
c75c0775e1 docs supabase update (#4935)
# docs: updated `Supabase` notebook

- the title of the notebook was inconsistent (included redundant
"Vectorstore"). Removed this "Vectorstore"
- added `Postgress` to the title. It is important. The `Postgres` name
is much more popular than `Supabase`.
- added description for the `Postrgress`
- added more info to the `Supabase` description
2023-05-18 10:42:08 -07:00
Davis Chase
55baa0d153 Update redis integration tests (#4937) 2023-05-18 10:22:17 -07:00
Davis Chase
440b8761f4 Redis kwargs fix (#4936)
cc @tylerhutcherson
2023-05-18 10:02:46 -07:00
elBarkey
a8ded21b69 FIX: GPTCache cache_obj creation loop (#4827)
_get_gptcache method keep creating new gptcache instance, here's the fix

# Fix GPTCache cache_obj creation loop

Fixes #4830 

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-18 09:42:35 -07:00
Alexey Nominas
c9e2a01875 Update GPT4ALL integration (#4567)
# Update GPT4ALL integration

GPT4ALL have completely changed their bindings. They use a bit odd
implementation that doesn't fit well into base.py and it will probably
be changed again, so it's a temporary solution.

Fixes #3839, #4628
2023-05-18 09:38:54 -07:00
Leonid Ganeline
e2d7677526 docs: compound ecosystem and integrations (#4870)
# Docs: compound ecosystem and integrations

**Problem statement:** We have a big overlap between the
References/Integrations and Ecosystem/LongChain Ecosystem pages. It
confuses users. It creates a situation when new integration is added
only on one of these pages, which creates even more confusion.
- removed References/Integrations page (but move all its information
into the individual integration pages - in the next PR).
- renamed Ecosystem/LongChain Ecosystem into Integrations/Integrations.
I like the Ecosystem term. It is more generic and semantically richer
than the Integration term. But it mentally overloads users. The
`integration` term is more concrete.
UPDATE: after discussion, the Ecosystem is the term.
Ecosystem/Integrations is the page (in place of Ecosystem/LongChain
Ecosystem).

As a result, a user gets a single place to start with the individual
integration.
2023-05-18 09:29:57 -07:00
Harrison Chase
d5a0704544 dont error on sql import (#4647)
this makes it so we dont throw errors when importing langchain when
sqlalchemy==1.3.1

we dont really want to support 1.3.1 (seems like unneccessary maintance
cost) BUT we would like it to not terribly error should someone decide
to run on it
2023-05-18 09:27:09 -07:00
Harrison Chase
c9a362e482 add alias for model (#4553)
Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-18 09:12:23 -07:00
Richard He
7642f2159c Add human message as input variable to chat agent prompt creation (#4542)
# Add human message as input variable to chat agent prompt creation

This PR adds human message and system message input to
`CHAT_ZERO_SHOT_REACT_DESCRIPTION` agent, similar to [conversational
chat
agent](7bcf238a1a/langchain/agents/conversational_chat/base.py (L64-L71)).

I met this issue trying to use `create_prompt` function when using the
[BabyAGI agent with tools
notebook](https://python.langchain.com/en/latest/use_cases/autonomous_agents/baby_agi_with_agent.html),
since BabyAGI uses “task” instead of “input” input variable. For normal
zero shot react agent this is fine because I can manually change the
suffix to “{input}/n/n{agent_scratchpad}” just like the notebook, but I
cannot do this with conversational chat agent, therefore blocking me to
use BabyAGI with chat zero shot agent.

I tested this in my own project
[Chrome-GPT](https://github.com/richardyc/Chrome-GPT) and this fix
worked.

## Request for review
Agents / Tools / Toolkits
- @vowelparrot
2023-05-18 09:09:31 -07:00
Yuekai Zhang
1ed4228822 Fix bilibili (#4860)
# Fix bilibili api import error

bilibili-api package is depracated and there is no sync module.

<!--
Thank you for contributing to LangChain! Your PR will appear in our next
release under the title you set. Please make sure it highlights your
valuable contribution.

Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.

After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.
-->

<!-- Remove if not applicable -->

Fixes #2673 #2724 

## Before submitting

<!-- If you're adding a new integration, include an integration test and
an example notebook showing its use! -->

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:
@vowelparrot  @liaokongVFX 

<!-- For a quicker response, figure out the right person to tag with @

        @hwchase17 - project lead

        Tracing / Callbacks
        - @agola11

        Async
        - @agola11

        DataLoaders
        - @eyurtsev

        Models
        - @hwchase17
        - @agola11

        Agents / Tools / Toolkits
        - @vowelparrot
        
        VectorStores / Retrievers / Memory
        - @dev2049
        
 -->
2023-05-18 09:56:51 -04:00
Eugene Yurtsev
e46202829f feat #4479: TextLoader auto detect encoding and improved exceptions (#4927)
# TextLoader auto detect encoding and enhanced exception handling

- Add an option to enable encoding detection on `TextLoader`. 
- The detection is done using `chardet`
- The loading is done by trying all detected encodings by order of
confidence or raise an exception otherwise.

### New Dependencies:
- `chardet`

Fixes #4479 

## Before submitting

<!-- If you're adding a new integration, include an integration test and
an example notebook showing its use! -->

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:

- @eyurtsev

---------

Co-authored-by: blob42 <spike@w530>
2023-05-18 09:55:14 -04:00
张城铭
8c28ad6dac API update: Engines -> Models (#4915)
# API update: Engines -> Models

see: https://community.openai.com/t/api-update-engines-models/18597

Co-authored-by: assert <zhangchengming@kkguan.com>
2023-05-18 09:54:42 -04:00
Eugene Yurtsev
c06a47a691 Load specific file types from Google Drive (issue #4878) (#4926)
# Load specific file types from Google Drive (issue #4878)
Add the possibility to define what file types you want to load from
Google Drive.
 
```
 loader = GoogleDriveLoader(
    folder_id="1yucgL9WGgWZdM1TOuKkeghlPizuzMYb5",
    file_types=["document", "pdf"]
    recursive=False
)
```

Fixes ##4878

## Who can review?
Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:
DataLoaders
- @eyurtsev

Twitter: [@UmerHAdil](https://twitter.com/@UmerHAdil) | Discord:
RicChilligerDude#7589

---------

Co-authored-by: UmerHA <40663591+UmerHA@users.noreply.github.com>
2023-05-18 09:27:53 -04:00
Harrison Chase
dfbf45f028 bump version to 173 (#4910) 2023-05-17 23:36:45 -07:00
Harrison Chase
b8d48939a2 Harrison/unified objectives (#4905)
Co-authored-by: Matthias Samwald <samwald@gmx.at>
2023-05-17 23:03:57 -07:00
Harrison Chase
9165267f8a Harrison/improved retry tool (#4842) 2023-05-17 21:41:01 -07:00
Harrison Chase
ba023d53ca Harrison/faiss norm (#4903)
Co-authored-by: Jiaxin Shan <seedjeffwan@gmail.com>
2023-05-17 21:40:49 -07:00
Harrison Chase
9e2227ba11 Harrison/serper api bug (#4902)
Co-authored-by: Jerry Luan <xmaswillyou@gmail.com>
2023-05-17 21:40:39 -07:00
Leonid Ganeline
c998569c8f docs: text splitters improvements (#4490)
#docs: text splitters improvements

Changes are only in the Jupyter notebooks.
- added links to the source packages and a short description of these
packages
- removed " Text Splitters" suffixes from the TOC elements (they made
the list of the text splitters messy)
- moved text splitters, based on the length function into a separate
list. They can be mixed with any classes from the "Text Splitters", so
it is a different classification.

## Who can review?
        @hwchase17 - project lead
        @eyurtsev
        @vowelparrot

NOTE: please, check out the results of the `Python code` text splitter
example (text_splitters/examples/python.ipynb). It looks suboptimal.
2023-05-17 21:33:34 -07:00
Steve Kim
613bf9b514 Update getting_started.md (#4482)
# Added another helpful way for developers who want to set OpenAI API
Key dynamically

Previous methods like exporting environment variables are good for
project-wide settings.
But many use cases need to assign API keys dynamically, recently.

```python
from langchain.llms import OpenAI
llm = OpenAI(openai_api_key="OPENAI_API_KEY")
```

## Before submitting
```bash
export OPENAI_API_KEY="..."
```
Or,
```python
import os
os.environ["OPENAI_API_KEY"] = "..."
```

<hr>

Thank you.
Cheers,
Bongsang
2023-05-17 21:32:25 -07:00
Ismael G Serrano
41e2394c9c Fix AzureOpenAI embeddings documentation example. model -> deployment (#4389)
# Documentation for Azure OpenAI embeddings model

- OPENAI_API_VERSION environment variable is needed for the endpoint
- The constructor does not work with model, it works with deployment.

I fixed it in the notebook.

(This is my first contribution)

## Who can review?

@hwchase17 
@agola

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2023-05-17 21:05:53 -07:00
Davis Chase
a4ac006658 Update gallery (#4873) 2023-05-17 20:59:41 -07:00
Davis Chase
8966f61ca5 Zep memory (#4898)
Co-authored-by: Daniel Chalef <daniel.chalef@private.org>
Co-authored-by: Daniel Chalef <131175+danielchalef@users.noreply.github.com>
2023-05-17 20:01:01 -07:00
Davis Chase
e28bdf4453 Cadlabs/python tool sanitization (#4754)
Co-authored-by: BenSchZA <BenSchZA@users.noreply.github.com>
2023-05-17 19:46:12 -07:00
Eugene Yurtsev
0dc304ca80 Add html parsers (#4874)
# Add bs4 html parser

* Some minor refactors
* Extract the bs4 html parsing code from the bs html loader
* Move some tests from integration tests to unit tests
2023-05-17 22:39:11 -04:00
Eugene Yurtsev
8e41143bf5 Add a generic document loader (#4875)
# Add generic document loader

* This PR adds a generic document loader which can assemble a loader
from a blob loader and a parser
* Adds a registry for parsers
* Populate registry with a default mimetype based parser


## Expected changes

- Parsing involves loading content via IO so can be sped up via:
  * Threading in sync
  * Async  
- The actual parsing logic may be computatinoally involved: may need to
figure out to add multi-processing support
- May want to add suffix based parser since suffixes are easier to
specify in comparison to mime types

## Before submitting

No notebooks yet, we first need to get a few of the basic parsers up
(prior to advertising the interface)
2023-05-17 22:38:55 -04:00
Davis Chase
df0c33a005 Faiss no avx2 (#4895)
Co-authored-by: Ali Mirlou <alimirlou@gmail.com>
2023-05-17 19:18:57 -07:00
Emil Ahlbäck
5c9205d5f4 ConversationalChatAgent: Allow customizing TEMPLATE_TOOL_RESPONSE (#2361)
It's currently not possible to change the `TEMPLATE_TOOL_RESPONSE`
prompt for ConversationalChatAgent, this PR changes that.

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-17 17:23:08 -07:00
Zander Chase
1ff7c958b0 Bold Crumbs (#4876) 2023-05-17 22:50:35 +00:00
Alexander Miasoiedov (Myasoedov)
4c3ab55e94 feat(Add FastAPI + Vercel deployment option): (#4520)
# Update deployments doc with langcorn API server

API server example 

```python
from fastapi import FastAPI

from langcorn import create_service

app: FastAPI = create_service(
    "examples.ex1:chain",
    "examples.ex2:chain",
    "examples.ex3:chain",
    "examples.ex4:sequential_chain",
    "examples.ex5:conversation",
    "examples.ex6:conversation_with_summary",
)

```
More examples: https://github.com/msoedov/langcorn/tree/main/examples

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-17 15:50:25 -07:00
Taqi Jaffri
ef8b5f64bc Tiny code review and docs fix for Docugami DataLoader (#4877)
# Docs and code review fixes for Docugami DataLoader

1. I noticed a couple of hyperlinks that are not loading in the
langchain docs (I guess need explicit anchor tags). Added those.
2. In code review @eyurtsev had a
[suggestion](https://github.com/hwchase17/langchain/pull/4727#discussion_r1194069347)
to allow string paths. Turns out just updating the type works (I tested
locally with string paths).

# Pre-submission checks
I ran `make lint` and `make tests` successfully.

---------

Co-authored-by: Taqi Jaffri <tjaffri@docugami.com>
2023-05-17 15:31:43 -07:00
C.J. Jameson
d6e0b9a43d fix homepage typo (#4883)
# Fix Homepage Typo

## Who can review?

Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested... not sure
2023-05-17 15:30:23 -07:00
Leonid Ganeline
b96ab4b763 docs retriever improvements (#4430)
# Docs: improvements in the `retrievers/examples/` notebooks

Its primary purpose is to make the Jupyter notebook examples
**consistent** and more suitable for first-time viewers.
- add links to the integration source (if applicable) with a short
description of this source;
- removed `_retriever` suffix from the file names (where it existed) for
consistency;
- removed ` retriever` from the notebook title (where it existed) for
consistency;
- added code to install necessary Python package(s);
- added code to set up the necessary API Key.
- very small fixes in notebooks from other folders (for consistency):
  - docs/modules/indexes/vectorstores/examples/elasticsearch.ipynb
  - docs/modules/indexes/vectorstores/examples/pinecone.ipynb
  - docs/modules/models/llms/integrations/cohere.ipynb
- fixed misspelling in langchain/retrievers/time_weighted_retriever.py
comment (sorry, about this change in a .py file )

## Who can review
@dev2049
2023-05-17 15:29:22 -07:00
Justin Levi Winter
0147f845f1 Update getting_started.ipynb (#4850)
minor grammer issue
2023-05-17 13:19:14 -07:00
Yong Fu
3e12f0957a Remove unused variables in Milvus vectorstore (#4868)
# Remove unused variables in Milvus vectorstore
This PR simply removes a variable unused in Milvus. The variable looks
like a copy-paste from other functions in Milvus but it is really
unnecessary.
2023-05-17 12:00:37 -07:00
Eugene Yurtsev
c5ab9782c6 Add beautiful soup 4 to extended testing extra (#4869)
# Add bs4 to extended testing extra

Updating extended testing extra in preparation for more refactors.
2023-05-17 14:11:26 -04:00
Ryan Culligan
6a9cdc43f5 Fix TypeError in Vectorstore Redis class methods (#4857)
# Fix TypeError in Vectorstore Redis class methods

This change resolves a TypeError that was raised when invoking the
`from_texts_return_keys` method from the `from_texts` method in the
`Redis` class. The error was due to the `cls` argument being passed
explicitly, which led to it being provided twice since it's also
implicitly passed in class methods. No relevant tests were added as the
issue appeared to be better suited for linters to catch proactively.

Changes:
- Removed `cls=cls` from the call to `from_texts_return_keys` in the
`from_texts` method.

Related to:
https://github.com/hwchase17/langchain/pull/4653
2023-05-17 10:48:09 -07:00
505 changed files with 23300 additions and 3644 deletions

View File

@@ -115,8 +115,37 @@ To get a report of current coverage, run the following:
make coverage
```
### Working with Optional Dependencies
Langchain relies heavily on optional dependencies to keep the Langchain package lightweight.
If you're adding a new dependency to Langchain, assume that it will be an optional dependency, and
that most users won't have it installed.
Users that do not have the dependency installed should be able to **import** your code without
any side effects (no warnings, no errors, no exceptions).
To introduce the dependency to the pyproject.toml file correctly, please do the following:
1. Add the dependency to the main group as an optional dependency
```bash
poetry add --optional [package_name]
```
2. Open pyproject.toml and add the dependency to the `extended_testing` extra
3. Relock the poetry file to update the extra.
```bash
poetry lock --no-update
```
4. Add a unit test that the very least attempts to import the new code. Ideally the unit
test makes use of lightweight fixtures to test the logic of the code.
5. Please use the `@pytest.mark.requires(package_name)` decorator for any tests that require the dependency.
### Testing
See section about optional dependencies.
#### Unit Tests
Unit tests cover modular logic that does not require calls to outside APIs.
To run unit tests:
@@ -133,8 +162,20 @@ make docker_tests
If you add new logic, please add a unit test.
#### Integration Tests
Integration tests cover logic that requires making calls to outside APIs (often integration with other services).
**warning** Almost no tests should be integration tests.
Tests that require making network connections make it difficult for other
developers to test the code.
Instead favor relying on `responses` library and/or mock.patch to mock
requests using small fixtures.
To run integration tests:
```bash

View File

@@ -1,7 +1,7 @@
# Your PR Title (What it does)
<!--
Thank you for contributing to LangChain! Your PR will appear in our next release under the title you set. Please make sure it highlights your valuable contribution.
Thank you for contributing to LangChain! Your PR will appear in our release under the title you set. Please make sure it highlights your valuable contribution.
Replace this with a description of the change, the issue it fixes (if applicable), and relevant context. List any dependencies required for this change.
@@ -14,7 +14,17 @@ Fixes # (issue)
## Before submitting
<!-- If you're adding a new integration, include an integration test and an example notebook showing its use! -->
<!-- If you're adding a new integration, please include:
1. a test for the integration - favor unit tests that does not rely on network access.
2. an example notebook showing its use
See contribution guidelines for more information on how to write tests, lint
etc:
https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
-->
## Who can review?
@@ -22,25 +32,25 @@ Community members can review the PR once tests pass. Tag maintainers/contributor
<!-- For a quicker response, figure out the right person to tag with @
@hwchase17 - project lead
@hwchase17 - project lead
Tracing / Callbacks
- @agola11
Tracing / Callbacks
- @agola11
Async
- @agola11
Async
- @agola11
DataLoaders
- @eyurtsev
DataLoaders
- @eyurtsev
Models
- @hwchase17
- @agola11
Models
- @hwchase17
- @agola11
Agents / Tools / Toolkits
- @vowelparrot
VectorStores / Retrievers / Memory
- @dev2049
Agents / Tools / Toolkits
- @vowelparrot
VectorStores / Retrievers / Memory
- @dev2049
-->

View File

@@ -4,6 +4,7 @@ on:
push:
branches: [master]
pull_request:
workflow_dispatch:
env:
POETRY_VERSION: "1.4.2"

View File

@@ -13,5 +13,5 @@ pre {
}
#my-component-root *, #headlessui-portal-root * {
z-index: 1000000000000;
z-index: 10000;
}

View File

@@ -30,10 +30,7 @@ document.addEventListener('DOMContentLoaded', () => {
const icon = React.createElement('p', {
style: { color: '#ffffff', fontSize: '22px',width: '48px', height: '48px', margin: '0px', padding: '0px', display: 'flex', alignItems: 'center', justifyContent: 'center', textAlign: 'center' },
}, [iconSpan1, iconSpan2]);
const mendableFloatingButton = React.createElement(
MendableFloatingButton,
{
@@ -42,6 +39,7 @@ document.addEventListener('DOMContentLoaded', () => {
anon_key: '82842b36-3ea6-49b2-9fb8-52cfc4bde6bf', // Mendable Search Public ANON key, ok to be public
messageSettings: {
openSourcesInNewTab: false,
prettySources: true // Prettify the sources displayed now
},
icon: icon,
}
@@ -52,7 +50,7 @@ document.addEventListener('DOMContentLoaded', () => {
loadScript('https://unpkg.com/react@17/umd/react.production.min.js', () => {
loadScript('https://unpkg.com/react-dom@17/umd/react-dom.production.min.js', () => {
loadScript('https://unpkg.com/@mendable/search@0.0.93/dist/umd/mendable.min.js', initializeMendable);
loadScript('https://unpkg.com/@mendable/search@0.0.102/dist/umd/mendable.min.js', initializeMendable);
});
});
});

View File

@@ -1,365 +0,0 @@
LangChain Gallery
=================
Lots of people have built some pretty awesome stuff with LangChain.
This is a collection of our favorites.
If you see any other demos that you think we should highlight, be sure to let us know!
Open Source
-----------
.. panels::
:body: text-center
---
.. link-button:: https://github.com/bborn/howdoi.ai
:type: url
:text: HowDoI.ai
:classes: stretched-link btn-lg
+++
This is an experiment in building a large-language-model-backed chatbot. It can hold a conversation, remember previous comments/questions,
and answer all types of queries (history, web search, movie data, weather, news, and more).
---
.. link-button:: https://colab.research.google.com/drive/1sKSTjt9cPstl_WMZ86JsgEqFG-aSAwkn?usp=sharing
:type: url
:text: YouTube Transcription QA with Sources
:classes: stretched-link btn-lg
+++
An end-to-end example of doing question answering on YouTube transcripts, returning the timestamps as sources to legitimize the answer.
---
.. link-button:: https://github.com/normandmickey/MrsStax
:type: url
:text: QA Slack Bot
:classes: stretched-link btn-lg
+++
This application is a Slack Bot that uses Langchain and OpenAI's GPT3 language model to provide domain specific answers. You provide the documents.
---
.. link-button:: https://github.com/OpenBioLink/ThoughtSource
:type: url
:text: ThoughtSource
:classes: stretched-link btn-lg
+++
A central, open resource and community around data and tools related to chain-of-thought reasoning in large language models.
---
.. link-button:: https://github.com/blackhc/llm-strategy
:type: url
:text: LLM Strategy
:classes: stretched-link btn-lg
+++
This Python package adds a decorator llm_strategy that connects to an LLM (such as OpenAIs GPT-3) and uses the LLM to "implement" abstract methods in interface classes. It does this by forwarding requests to the LLM and converting the responses back to Python data using Python's @dataclasses.
---
.. link-button:: https://github.com/JohnNay/llm-lobbyist
:type: url
:text: Zero-Shot Corporate Lobbyist
:classes: stretched-link btn-lg
+++
A notebook showing how to use GPT to help with the work of a corporate lobbyist.
---
.. link-button:: https://dagster.io/blog/chatgpt-langchain
:type: url
:text: Dagster Documentation ChatBot
:classes: stretched-link btn-lg
+++
A jupyter notebook demonstrating how you could create a semantic search engine on documents in one of your Google Folders
---
.. link-button:: https://github.com/venuv/langchain_semantic_search
:type: url
:text: Google Folder Semantic Search
:classes: stretched-link btn-lg
+++
Build a GitHub support bot with GPT3, LangChain, and Python.
---
.. link-button:: https://huggingface.co/spaces/team7/talk_with_wind
:type: url
:text: Talk With Wind
:classes: stretched-link btn-lg
+++
Record sounds of anything (birds, wind, fire, train station) and chat with it.
---
.. link-button:: https://huggingface.co/spaces/JavaFXpert/Chat-GPT-LangChain
:type: url
:text: ChatGPT LangChain
:classes: stretched-link btn-lg
+++
This simple application demonstrates a conversational agent implemented with OpenAI GPT-3.5 and LangChain. When necessary, it leverages tools for complex math, searching the internet, and accessing news and weather.
---
.. link-button:: https://huggingface.co/spaces/JavaFXpert/gpt-math-techniques
:type: url
:text: GPT Math Techniques
:classes: stretched-link btn-lg
+++
A Hugging Face spaces project showing off the benefits of using PAL for math problems.
---
.. link-button:: https://colab.research.google.com/drive/1xt2IsFPGYMEQdoJFNgWNAjWGxa60VXdV
:type: url
:text: GPT Political Compass
:classes: stretched-link btn-lg
+++
Measure the political compass of GPT.
---
.. link-button:: https://github.com/hwchase17/notion-qa
:type: url
:text: Notion Database Question-Answering Bot
:classes: stretched-link btn-lg
+++
Open source GitHub project shows how to use LangChain to create a chatbot that can answer questions about an arbitrary Notion database.
---
.. link-button:: https://github.com/jerryjliu/llama_index
:type: url
:text: LlamaIndex
:classes: stretched-link btn-lg
+++
LlamaIndex (formerly GPT Index) is a project consisting of a set of data structures that are created using GPT-3 and can be traversed using GPT-3 in order to answer queries.
---
.. link-button:: https://github.com/JavaFXpert/llm-grovers-search-party
:type: url
:text: Grover's Algorithm
:classes: stretched-link btn-lg
+++
Leveraging Qiskit, OpenAI and LangChain to demonstrate Grover's algorithm
---
.. link-button:: https://huggingface.co/spaces/rituthombre/QNim
:type: url
:text: QNimGPT
:classes: stretched-link btn-lg
+++
A chat UI to play Nim, where a player can select an opponent, either a quantum computer or an AI
---
.. link-button:: https://colab.research.google.com/drive/19WTIWC3prw5LDMHmRMvqNV2loD9FHls6?usp=sharing
:type: url
:text: ReAct TextWorld
:classes: stretched-link btn-lg
+++
Leveraging the ReActTextWorldAgent to play TextWorld with an LLM!
---
.. link-button:: https://github.com/jagilley/fact-checker
:type: url
:text: Fact Checker
:classes: stretched-link btn-lg
+++
This repo is a simple demonstration of using LangChain to do fact-checking with prompt chaining.
---
.. link-button:: https://github.com/arc53/docsgpt
:type: url
:text: DocsGPT
:classes: stretched-link btn-lg
+++
Answer questions about the documentation of any project
---
.. link-button:: https://github.com/akshata29/chatpdf
:type: url
:text: Chat & Ask your data
:classes: stretched-link btn-lg
+++
This sample demonstrates a few approaches for creating ChatGPT-like experiences over your own data. It uses OpenAI / Azure OpenAI Service to access the ChatGPT model (gpt-35-turbo and gpt3), and vector store (Pinecone, Redis and others) or Azure cognitive search for data indexing and retrieval.
Misc. Colab Notebooks
~~~~~~~~~~~~~~~~~~~~~
.. panels::
:body: text-center
---
.. link-button:: https://colab.research.google.com/drive/1AAyEdTz-Z6ShKvewbt1ZHUICqak0MiwR?usp=sharing
:type: url
:text: Wolfram Alpha in Conversational Agent
:classes: stretched-link btn-lg
+++
Give ChatGPT a WolframAlpha neural implant
---
.. link-button:: https://colab.research.google.com/drive/1UsCLcPy8q5PMNQ5ytgrAAAHa124dzLJg?usp=sharing
:type: url
:text: Tool Updates in Agents
:classes: stretched-link btn-lg
+++
Agent improvements (6th Jan 2023)
---
.. link-button:: https://colab.research.google.com/drive/1UsCLcPy8q5PMNQ5ytgrAAAHa124dzLJg?usp=sharing
:type: url
:text: Conversational Agent with Tools (Langchain AGI)
:classes: stretched-link btn-lg
+++
Langchain AGI (23rd Dec 2022)
Proprietary
-----------
.. panels::
:body: text-center
---
.. link-button:: https://twitter.com/sjwhitmore/status/1580593217153531908?s=20&t=neQvtZZTlp623U3LZwz3bQ
:type: url
:text: Daimon
:classes: stretched-link btn-lg
+++
A chat-based AI personal assistant with long-term memory about you.
---
.. link-button:: https://anysummary.app
:type: url
:text: Summarize any file with AI
:classes: stretched-link btn-lg
+++
Summarize not only long docs, interview audio or video files quickly, but also entire websites and YouTube videos. Share or download your generated summaries to collaborate with others, or revisit them at any time! Bonus: `@anysummary <https://twitter.com/anysummary>`_ on Twitter will also summarize any thread it is tagged in.
---
.. link-button:: https://twitter.com/dory111111/status/1608406234646052870?s=20&t=XYlrbKM0ornJsrtGa0br-g
:type: url
:text: AI Assisted SQL Query Generator
:classes: stretched-link btn-lg
+++
An app to write SQL using natural language, and execute against real DB.
---
.. link-button:: https://twitter.com/krrish_dh/status/1581028925618106368?s=20&t=neQvtZZTlp623U3LZwz3bQ
:type: url
:text: Clerkie
:classes: stretched-link btn-lg
+++
Stack Tracing QA Bot to help debug complex stack tracing (especially the ones that go multi-function/file deep).
---
.. link-button:: https://twitter.com/Raza_Habib496/status/1596880140490838017?s=20&t=6MqEQYWfSqmJwsKahjCVOA
:type: url
:text: Sales Email Writer
:classes: stretched-link btn-lg
+++
By Raza Habib, this demo utilizes LangChain + SerpAPI + HumanLoop to write sales emails. Give it a company name and a person, this application will use Google Search (via SerpAPI) to get more information on the company and the person, and then write them a sales message.
---
.. link-button:: https://twitter.com/chillzaza_/status/1592961099384905730?s=20&t=EhU8jl0KyCPJ7vE9Rnz-cQ
:type: url
:text: Question-Answering on a Web Browser
:classes: stretched-link btn-lg
+++
By Zahid Khawaja, this demo utilizes question answering to answer questions about a given website. A followup added this for `YouTube videos <https://twitter.com/chillzaza_/status/1593739682013220865?s=20&t=EhU8jl0KyCPJ7vE9Rnz-cQ>`_, and then another followup added it for `Wikipedia <https://twitter.com/chillzaza_/status/1594847151238037505?s=20&t=EhU8jl0KyCPJ7vE9Rnz-cQ>`_.
---
.. link-button:: https://mynd.so
:type: url
:text: Mynd
:classes: stretched-link btn-lg
+++
A journaling app for self-care that uses AI to uncover insights and patterns over time.
Articles on **Google Scholar**
-----------------------------
LangChain is used in many scientific and research projects.
**Google Scholar** presents a `list of the papers <https://scholar.google.com/scholar?q=%22langchain%22&hl=en&as_sdt=0,5&as_vis=1>`_
with references to LangChain.

View File

@@ -1,107 +1,57 @@
# LangChain Tracing
# Tracing
LangChain Plus helps you visualize, monitor, and evaluate LLM applications. To get started with local or hosted tracing, use one of the following guides.
By enabling tracing in your LangChain runs, youll be able to more effectively visualize, step through, and debug your chains and agents.
- [Locally Hosted Tracing](../tracing/local_installation.md)
- [Cloud Hosted Tracing](../tracing/hosted_installation.md)
First, you should install tracing and set up your environment properly.
You can use either a locally hosted version of this (uses Docker) or a cloud hosted version (in closed alpha).
If you're interested in using the hosted platform, please fill out the form [here](https://forms.gle/tRCEMSeopZf6TE3b6).
_Our hosted alpha is currently invite-only. To sign up for the wait list, please fill out the form [here](https://forms.gle/tRCEMSeopZf6TE3b6)._
- [Locally Hosted Setup](../tracing/local_installation.md)
- [Cloud Hosted Setup](../tracing/hosted_installation.md)
## Tracing Walkthrough
## Saving Traces
When you first access the UI, you should see a page with your tracing sessions.
An initial one "default" should already be created for you.
A session is just a way to group traces together.
If you click on a session, it will take you to a page with no recorded traces that says "No Runs."
You can create a new session with the new session form.
Once you've launched the local tracing server or made an account and retrieved an API key to the hosted solution, your LangChain application will automatically log traces as long as
you set the following environment variables:
```bash
export LANGCHAIN_TRACING_V2="true"
# export LANGCHAIN_SESSION="my session name" # Otherwise, traces are stored in the "default" session
# export LANGCHAIN_ENDPOINT="https://api.langchain.plus" # Uncomment if using hosted server
# export LANGCHAIN_API_KEY="my api key" # Uncomment and add your API key generated from the settings page if using a hosted server
```
As long as these variables are correctly set, and the server is online, all your LangChain runs will be saved. You can interact with these traces in the UI or using the `LangChainPlus` client.
## Tracing UI Walkthrough
When you first access the LangChain Plus UI (and after signing in, if you are using the hosted version), you should be greeted by the home screen with more instructions on how to get started.
From here, you can navigate to the `Sessions` and `Datasets` pages. For more information on using datasets in LangChain Plus, check out the [Datasets](../tracing/datasets.md) guide.
Traces from your LangChain runs can be found in the `Sessions` page. A "default" session should already be created for you.
A session is just a way to group traces together. If you click on a session, it will take you to a page that with no recorded runs.
You can create and save traces to new sessions by specifying the `LANGCHAIN_SESSION` environment variable in your LangChain application. You can check out the [Chainging Sessions](#changing-sessions) section below for more configuration options.
<!-- TODO Add screenshots when the UI settles down a bit -->
<!-- ![](../tracing/homepage.png) -->
![](../tracing/homepage.png)
If we click on the `default` session, we can see that to start we have no traces stored.
<!-- TODO Add screenshots when the UI settles down a bit -->
<!-- ![](../tracing/default_empty.png) -->
![](../tracing/default_empty.png)
If we now start running chains and agents with tracing enabled, we will see data show up here.
To do so, we can run [this notebook](../tracing/agent_with_tracing.ipynb) as an example.
After running it, we will see an initial trace show up.
<!-- To do so, we can run [this notebook](../tracing/agent_with_tracing.ipynb) as an example. After running it, we will see an initial trace show up. -->
<!-- TODO Add screenshots when the UI settles down a bit -->
![](../tracing/first_trace.png)
From here we can explore the trace at a high level by clicking on the arrow to show nested runs.
We can keep on clicking further and further down to explore deeper and deeper.
<!-- TODO Add screenshots when the UI settles down a bit -->
<!-- ![](../tracing/explore.png) -->
![](../tracing/explore.png)
We can also click on the "Explore" button of the top level run to dive even deeper.
Here, we can see the inputs and outputs in full, as well as all the nested traces.
<!-- TODO Add screenshots when the UI settles down a bit -->
<!-- ![](../tracing/explore_trace.png) -->
![](../tracing/explore_trace.png)
We can keep on exploring each of these nested traces in more detail.
For example, here is the lowest level trace with the exact inputs/outputs to the LLM.
<!-- TODO Add screenshots when the UI settles down a bit -->
<!-- ![](../tracing/explore_llm.png) -->
![](../tracing/explore_llm.png)
## Changing Sessions
1. To record traces to a session other than `"default"`, you can set the `LANGCHAIN_SESSION` environment variable to the name of the session you want to record to:
1. To initially record traces to a session other than `"default"`, you can set the `LANGCHAIN_SESSION` environment variable to the name of the session you want to record to:
```python
import os
os.environ["LANGCHAIN_TRACING_V2"] = "true"
os.environ["LANGCHAIN_SESSION"] = "my_session"
```
```python
import os
os.environ["LANGCHAIN_TRACING"] = "true"
os.environ["LANGCHAIN_SESSION"] = "my_session" # Make sure this session actually exists. You can create a new session in the UI.
```
2. To switch sessions mid-script or mid-notebook, you have a few options:
a. Explicitly pass in a new `LangChainTracer` callback
```python
from langchain.callbacks.tracers import LangChainTracer
tracer = LangChainTracer(session_name="My new session")
agent.run("How many people live in canada as of 2023?", callbacks=[tracer])
```
b. Use the `tracing_v2_enabled` context manager:
```python
import os
from langchain.callbacks.manager import tracing_v2_enabled
os.environ["LANGCHAIN_SESSION"] = "my_session"
# ... traces logged to "my_session" ...
with tracing_v2_enabled("My Scoped Session Name"):
# ... traces logged to "My New Session" ...
```
c. Update the `LANGCHAIN_SESSION` environment variable (not thread safe)
```python
import os
os.environ["LANGCHAIN_SESSION"] = "my_session"
# ... traces logged to 'my_session' ...
os.environ["LANGCHAIN_SESSION"] = "My New Session"
# ... traces logged to "My New Session" ...
```
2. To switch sessions mid-script or mid-notebook, do NOT set the `LANGCHAIN_SESSION` environment variable. Instead: `langchain.set_tracing_callback_manager(session_name="my_session")`

192
docs/dependents.md Normal file
View File

@@ -0,0 +1,192 @@
# Dependents
Dependents stats for `hwchase17/langchain`
[![](https://img.shields.io/static/v1?label=Used%20by&message=5152&color=informational&logo=slickpic)](https://github.com/hwchase17/langchain/network/dependents)
[![](https://img.shields.io/static/v1?label=Used%20by%20(public)&message=172&color=informational&logo=slickpic)](https://github.com/hwchase17/langchain/network/dependents)
[![](https://img.shields.io/static/v1?label=Used%20by%20(private)&message=4980&color=informational&logo=slickpic)](https://github.com/hwchase17/langchain/network/dependents)
[![](https://img.shields.io/static/v1?label=Used%20by%20(stars)&message=17239&color=informational&logo=slickpic)](https://github.com/hwchase17/langchain/network/dependents)
[update: 2023-05-17; only dependent repositories with Stars > 100]
| Repository | Stars |
| :-------- | -----: |
|[openai/openai-cookbook](https://github.com/openai/openai-cookbook) | 35401 |
|[LAION-AI/Open-Assistant](https://github.com/LAION-AI/Open-Assistant) | 32861 |
|[microsoft/TaskMatrix](https://github.com/microsoft/TaskMatrix) | 32766 |
|[hpcaitech/ColossalAI](https://github.com/hpcaitech/ColossalAI) | 29560 |
|[reworkd/AgentGPT](https://github.com/reworkd/AgentGPT) | 22315 |
|[imartinez/privateGPT](https://github.com/imartinez/privateGPT) | 17474 |
|[openai/chatgpt-retrieval-plugin](https://github.com/openai/chatgpt-retrieval-plugin) | 16923 |
|[mindsdb/mindsdb](https://github.com/mindsdb/mindsdb) | 16112 |
|[jerryjliu/llama_index](https://github.com/jerryjliu/llama_index) | 15407 |
|[mlflow/mlflow](https://github.com/mlflow/mlflow) | 14345 |
|[GaiZhenbiao/ChuanhuChatGPT](https://github.com/GaiZhenbiao/ChuanhuChatGPT) | 10372 |
|[databrickslabs/dolly](https://github.com/databrickslabs/dolly) | 9919 |
|[AIGC-Audio/AudioGPT](https://github.com/AIGC-Audio/AudioGPT) | 8177 |
|[logspace-ai/langflow](https://github.com/logspace-ai/langflow) | 6807 |
|[imClumsyPanda/langchain-ChatGLM](https://github.com/imClumsyPanda/langchain-ChatGLM) | 6087 |
|[arc53/DocsGPT](https://github.com/arc53/DocsGPT) | 5292 |
|[e2b-dev/e2b](https://github.com/e2b-dev/e2b) | 4622 |
|[nsarrazin/serge](https://github.com/nsarrazin/serge) | 4076 |
|[madawei2699/myGPTReader](https://github.com/madawei2699/myGPTReader) | 3952 |
|[zauberzeug/nicegui](https://github.com/zauberzeug/nicegui) | 3952 |
|[go-skynet/LocalAI](https://github.com/go-skynet/LocalAI) | 3762 |
|[GreyDGL/PentestGPT](https://github.com/GreyDGL/PentestGPT) | 3388 |
|[mmabrouk/chatgpt-wrapper](https://github.com/mmabrouk/chatgpt-wrapper) | 3243 |
|[zilliztech/GPTCache](https://github.com/zilliztech/GPTCache) | 3189 |
|[wenda-LLM/wenda](https://github.com/wenda-LLM/wenda) | 3050 |
|[marqo-ai/marqo](https://github.com/marqo-ai/marqo) | 2930 |
|[gkamradt/langchain-tutorials](https://github.com/gkamradt/langchain-tutorials) | 2710 |
|[PrefectHQ/marvin](https://github.com/PrefectHQ/marvin) | 2545 |
|[project-baize/baize-chatbot](https://github.com/project-baize/baize-chatbot) | 2479 |
|[whitead/paper-qa](https://github.com/whitead/paper-qa) | 2399 |
|[langgenius/dify](https://github.com/langgenius/dify) | 2344 |
|[GerevAI/gerev](https://github.com/GerevAI/gerev) | 2283 |
|[hwchase17/chat-langchain](https://github.com/hwchase17/chat-langchain) | 2266 |
|[guangzhengli/ChatFiles](https://github.com/guangzhengli/ChatFiles) | 1903 |
|[Azure-Samples/azure-search-openai-demo](https://github.com/Azure-Samples/azure-search-openai-demo) | 1884 |
|[OpenBMB/BMTools](https://github.com/OpenBMB/BMTools) | 1860 |
|[Farama-Foundation/PettingZoo](https://github.com/Farama-Foundation/PettingZoo) | 1813 |
|[OpenGVLab/Ask-Anything](https://github.com/OpenGVLab/Ask-Anything) | 1571 |
|[IntelligenzaArtificiale/Free-Auto-GPT](https://github.com/IntelligenzaArtificiale/Free-Auto-GPT) | 1480 |
|[hwchase17/notion-qa](https://github.com/hwchase17/notion-qa) | 1464 |
|[NVIDIA/NeMo-Guardrails](https://github.com/NVIDIA/NeMo-Guardrails) | 1419 |
|[Unstructured-IO/unstructured](https://github.com/Unstructured-IO/unstructured) | 1410 |
|[Kav-K/GPTDiscord](https://github.com/Kav-K/GPTDiscord) | 1363 |
|[paulpierre/RasaGPT](https://github.com/paulpierre/RasaGPT) | 1344 |
|[StanGirard/quivr](https://github.com/StanGirard/quivr) | 1330 |
|[lunasec-io/lunasec](https://github.com/lunasec-io/lunasec) | 1318 |
|[vocodedev/vocode-python](https://github.com/vocodedev/vocode-python) | 1286 |
|[agiresearch/OpenAGI](https://github.com/agiresearch/OpenAGI) | 1156 |
|[h2oai/h2ogpt](https://github.com/h2oai/h2ogpt) | 1141 |
|[jina-ai/thinkgpt](https://github.com/jina-ai/thinkgpt) | 1106 |
|[yanqiangmiffy/Chinese-LangChain](https://github.com/yanqiangmiffy/Chinese-LangChain) | 1072 |
|[ttengwang/Caption-Anything](https://github.com/ttengwang/Caption-Anything) | 1064 |
|[jina-ai/dev-gpt](https://github.com/jina-ai/dev-gpt) | 1057 |
|[juncongmoo/chatllama](https://github.com/juncongmoo/chatllama) | 1003 |
|[greshake/llm-security](https://github.com/greshake/llm-security) | 1002 |
|[visual-openllm/visual-openllm](https://github.com/visual-openllm/visual-openllm) | 957 |
|[richardyc/Chrome-GPT](https://github.com/richardyc/Chrome-GPT) | 918 |
|[irgolic/AutoPR](https://github.com/irgolic/AutoPR) | 886 |
|[mmz-001/knowledge_gpt](https://github.com/mmz-001/knowledge_gpt) | 867 |
|[thomas-yanxin/LangChain-ChatGLM-Webui](https://github.com/thomas-yanxin/LangChain-ChatGLM-Webui) | 850 |
|[microsoft/X-Decoder](https://github.com/microsoft/X-Decoder) | 837 |
|[peterw/Chat-with-Github-Repo](https://github.com/peterw/Chat-with-Github-Repo) | 826 |
|[cirediatpl/FigmaChain](https://github.com/cirediatpl/FigmaChain) | 782 |
|[hashintel/hash](https://github.com/hashintel/hash) | 778 |
|[seanpixel/Teenage-AGI](https://github.com/seanpixel/Teenage-AGI) | 773 |
|[jina-ai/langchain-serve](https://github.com/jina-ai/langchain-serve) | 738 |
|[corca-ai/EVAL](https://github.com/corca-ai/EVAL) | 737 |
|[ai-sidekick/sidekick](https://github.com/ai-sidekick/sidekick) | 717 |
|[rlancemartin/auto-evaluator](https://github.com/rlancemartin/auto-evaluator) | 703 |
|[poe-platform/api-bot-tutorial](https://github.com/poe-platform/api-bot-tutorial) | 689 |
|[SamurAIGPT/Camel-AutoGPT](https://github.com/SamurAIGPT/Camel-AutoGPT) | 666 |
|[eyurtsev/kor](https://github.com/eyurtsev/kor) | 608 |
|[run-llama/llama-lab](https://github.com/run-llama/llama-lab) | 559 |
|[namuan/dr-doc-search](https://github.com/namuan/dr-doc-search) | 544 |
|[pieroit/cheshire-cat](https://github.com/pieroit/cheshire-cat) | 520 |
|[griptape-ai/griptape](https://github.com/griptape-ai/griptape) | 514 |
|[getmetal/motorhead](https://github.com/getmetal/motorhead) | 481 |
|[hwchase17/chat-your-data](https://github.com/hwchase17/chat-your-data) | 462 |
|[langchain-ai/langchain-aiplugin](https://github.com/langchain-ai/langchain-aiplugin) | 452 |
|[jina-ai/agentchain](https://github.com/jina-ai/agentchain) | 439 |
|[SamurAIGPT/ChatGPT-Developer-Plugins](https://github.com/SamurAIGPT/ChatGPT-Developer-Plugins) | 437 |
|[alexanderatallah/window.ai](https://github.com/alexanderatallah/window.ai) | 433 |
|[michaelthwan/searchGPT](https://github.com/michaelthwan/searchGPT) | 427 |
|[mpaepper/content-chatbot](https://github.com/mpaepper/content-chatbot) | 425 |
|[mckaywrigley/repo-chat](https://github.com/mckaywrigley/repo-chat) | 422 |
|[whyiyhw/chatgpt-wechat](https://github.com/whyiyhw/chatgpt-wechat) | 421 |
|[freddyaboulton/gradio-tools](https://github.com/freddyaboulton/gradio-tools) | 407 |
|[jonra1993/fastapi-alembic-sqlmodel-async](https://github.com/jonra1993/fastapi-alembic-sqlmodel-async) | 395 |
|[yeagerai/yeagerai-agent](https://github.com/yeagerai/yeagerai-agent) | 383 |
|[akshata29/chatpdf](https://github.com/akshata29/chatpdf) | 374 |
|[OpenGVLab/InternGPT](https://github.com/OpenGVLab/InternGPT) | 368 |
|[ruoccofabrizio/azure-open-ai-embeddings-qna](https://github.com/ruoccofabrizio/azure-open-ai-embeddings-qna) | 358 |
|[101dotxyz/GPTeam](https://github.com/101dotxyz/GPTeam) | 357 |
|[mtenenholtz/chat-twitter](https://github.com/mtenenholtz/chat-twitter) | 354 |
|[amosjyng/langchain-visualizer](https://github.com/amosjyng/langchain-visualizer) | 343 |
|[msoedov/langcorn](https://github.com/msoedov/langcorn) | 334 |
|[showlab/VLog](https://github.com/showlab/VLog) | 330 |
|[continuum-llms/chatgpt-memory](https://github.com/continuum-llms/chatgpt-memory) | 324 |
|[steamship-core/steamship-langchain](https://github.com/steamship-core/steamship-langchain) | 323 |
|[daodao97/chatdoc](https://github.com/daodao97/chatdoc) | 320 |
|[xuwenhao/geektime-ai-course](https://github.com/xuwenhao/geektime-ai-course) | 308 |
|[StevenGrove/GPT4Tools](https://github.com/StevenGrove/GPT4Tools) | 301 |
|[logan-markewich/llama_index_starter_pack](https://github.com/logan-markewich/llama_index_starter_pack) | 300 |
|[andylokandy/gpt-4-search](https://github.com/andylokandy/gpt-4-search) | 299 |
|[Anil-matcha/ChatPDF](https://github.com/Anil-matcha/ChatPDF) | 287 |
|[itamargol/openai](https://github.com/itamargol/openai) | 273 |
|[BlackHC/llm-strategy](https://github.com/BlackHC/llm-strategy) | 267 |
|[momegas/megabots](https://github.com/momegas/megabots) | 259 |
|[bborn/howdoi.ai](https://github.com/bborn/howdoi.ai) | 238 |
|[Cheems-Seminar/grounded-segment-any-parts](https://github.com/Cheems-Seminar/grounded-segment-any-parts) | 232 |
|[ur-whitelab/exmol](https://github.com/ur-whitelab/exmol) | 227 |
|[sullivan-sean/chat-langchainjs](https://github.com/sullivan-sean/chat-langchainjs) | 227 |
|[explosion/spacy-llm](https://github.com/explosion/spacy-llm) | 226 |
|[recalign/RecAlign](https://github.com/recalign/RecAlign) | 218 |
|[jupyterlab/jupyter-ai](https://github.com/jupyterlab/jupyter-ai) | 218 |
|[alvarosevilla95/autolang](https://github.com/alvarosevilla95/autolang) | 215 |
|[conceptofmind/toolformer](https://github.com/conceptofmind/toolformer) | 213 |
|[MagnivOrg/prompt-layer-library](https://github.com/MagnivOrg/prompt-layer-library) | 209 |
|[JohnSnowLabs/nlptest](https://github.com/JohnSnowLabs/nlptest) | 208 |
|[airobotlab/KoChatGPT](https://github.com/airobotlab/KoChatGPT) | 197 |
|[langchain-ai/auto-evaluator](https://github.com/langchain-ai/auto-evaluator) | 195 |
|[yvann-hub/Robby-chatbot](https://github.com/yvann-hub/Robby-chatbot) | 195 |
|[alejandro-ao/langchain-ask-pdf](https://github.com/alejandro-ao/langchain-ask-pdf) | 192 |
|[daveebbelaar/langchain-experiments](https://github.com/daveebbelaar/langchain-experiments) | 189 |
|[NimbleBoxAI/ChainFury](https://github.com/NimbleBoxAI/ChainFury) | 187 |
|[kaleido-lab/dolphin](https://github.com/kaleido-lab/dolphin) | 184 |
|[Anil-matcha/Website-to-Chatbot](https://github.com/Anil-matcha/Website-to-Chatbot) | 183 |
|[plchld/InsightFlow](https://github.com/plchld/InsightFlow) | 180 |
|[OpenBMB/AgentVerse](https://github.com/OpenBMB/AgentVerse) | 166 |
|[benthecoder/ClassGPT](https://github.com/benthecoder/ClassGPT) | 166 |
|[jbrukh/gpt-jargon](https://github.com/jbrukh/gpt-jargon) | 161 |
|[hardbyte/qabot](https://github.com/hardbyte/qabot) | 160 |
|[shaman-ai/agent-actors](https://github.com/shaman-ai/agent-actors) | 153 |
|[radi-cho/datasetGPT](https://github.com/radi-cho/datasetGPT) | 153 |
|[poe-platform/poe-protocol](https://github.com/poe-platform/poe-protocol) | 152 |
|[paolorechia/learn-langchain](https://github.com/paolorechia/learn-langchain) | 149 |
|[ajndkr/lanarky](https://github.com/ajndkr/lanarky) | 149 |
|[fengyuli-dev/multimedia-gpt](https://github.com/fengyuli-dev/multimedia-gpt) | 147 |
|[yasyf/compress-gpt](https://github.com/yasyf/compress-gpt) | 144 |
|[homanp/superagent](https://github.com/homanp/superagent) | 143 |
|[realminchoi/babyagi-ui](https://github.com/realminchoi/babyagi-ui) | 141 |
|[ethanyanjiali/minChatGPT](https://github.com/ethanyanjiali/minChatGPT) | 141 |
|[ccurme/yolopandas](https://github.com/ccurme/yolopandas) | 139 |
|[hwchase17/langchain-streamlit-template](https://github.com/hwchase17/langchain-streamlit-template) | 138 |
|[Jaseci-Labs/jaseci](https://github.com/Jaseci-Labs/jaseci) | 136 |
|[hirokidaichi/wanna](https://github.com/hirokidaichi/wanna) | 135 |
|[Haste171/langchain-chatbot](https://github.com/Haste171/langchain-chatbot) | 134 |
|[jmpaz/promptlib](https://github.com/jmpaz/promptlib) | 130 |
|[Klingefjord/chatgpt-telegram](https://github.com/Klingefjord/chatgpt-telegram) | 130 |
|[filip-michalsky/SalesGPT](https://github.com/filip-michalsky/SalesGPT) | 128 |
|[handrew/browserpilot](https://github.com/handrew/browserpilot) | 128 |
|[shauryr/S2QA](https://github.com/shauryr/S2QA) | 127 |
|[steamship-core/vercel-examples](https://github.com/steamship-core/vercel-examples) | 127 |
|[yasyf/summ](https://github.com/yasyf/summ) | 127 |
|[gia-guar/JARVIS-ChatGPT](https://github.com/gia-guar/JARVIS-ChatGPT) | 126 |
|[jerlendds/osintbuddy](https://github.com/jerlendds/osintbuddy) | 125 |
|[ibiscp/LLM-IMDB](https://github.com/ibiscp/LLM-IMDB) | 124 |
|[Teahouse-Studios/akari-bot](https://github.com/Teahouse-Studios/akari-bot) | 124 |
|[hwchase17/chroma-langchain](https://github.com/hwchase17/chroma-langchain) | 124 |
|[menloparklab/langchain-cohere-qdrant-doc-retrieval](https://github.com/menloparklab/langchain-cohere-qdrant-doc-retrieval) | 123 |
|[peterw/StoryStorm](https://github.com/peterw/StoryStorm) | 123 |
|[chakkaradeep/pyCodeAGI](https://github.com/chakkaradeep/pyCodeAGI) | 123 |
|[petehunt/langchain-github-bot](https://github.com/petehunt/langchain-github-bot) | 115 |
|[su77ungr/CASALIOY](https://github.com/su77ungr/CASALIOY) | 113 |
|[eunomia-bpf/GPTtrace](https://github.com/eunomia-bpf/GPTtrace) | 113 |
|[zenml-io/zenml-projects](https://github.com/zenml-io/zenml-projects) | 112 |
|[pablomarin/GPT-Azure-Search-Engine](https://github.com/pablomarin/GPT-Azure-Search-Engine) | 111 |
|[shamspias/customizable-gpt-chatbot](https://github.com/shamspias/customizable-gpt-chatbot) | 109 |
|[WongSaang/chatgpt-ui-server](https://github.com/WongSaang/chatgpt-ui-server) | 108 |
|[davila7/file-gpt](https://github.com/davila7/file-gpt) | 104 |
|[enhancedocs/enhancedocs](https://github.com/enhancedocs/enhancedocs) | 102 |
|[aurelio-labs/arxiv-bot](https://github.com/aurelio-labs/arxiv-bot) | 101 |
_Generated by [github-dependents-info](https://github.com/nvuillam/github-dependents-info)_
[github-dependents-info --repo hwchase17/langchain --markdownfile dependents.md --minstars 100 --sort stars]

View File

@@ -29,6 +29,10 @@ It implements a Question Answering app and contains instructions for deploying t
A minimal example on how to run LangChain on Vercel using Flask.
## [FastAPI + Vercel](https://github.com/msoedov/langcorn)
A minimal example on how to run LangChain on Vercel using FastAPI and LangCorn/Uvicorn.
## [Kinsta](https://github.com/kinsta/hello-world-langchain)
A minimal example on how to deploy LangChain to [Kinsta](https://kinsta.com) using Flask.

View File

@@ -0,0 +1,20 @@
# ModelScope
This page covers how to use the modelscope ecosystem within LangChain.
It is broken into two parts: installation and setup, and then references to specific modelscope wrappers.
## Installation and Setup
* Install the Python SDK with `pip install modelscope`
## Wrappers
### Embeddings
There exists a modelscope Embeddings wrapper, which you can access with
```python
from langchain.embeddings import ModelScopeEmbeddings
```
For a more detailed walkthrough of this, see [this notebook](../modules/models/text_embedding/examples/modelscope_hub.ipynb)

View File

@@ -23,7 +23,7 @@ The results of these actions can then be fed back into the language model to gen
## ReAct
`ReAct` is a prompting technique that combines Chain-of-Thought prompting with action plan generation.
This induces the to model to think about what action to take, then take it.
This induces the model to think about what action to take, then take it.
- [Paper](https://arxiv.org/pdf/2210.03629.pdf)
- [LangChain Example](../modules/agents/agents/examples/react.ipynb)

View File

@@ -37,6 +37,12 @@ import os
os.environ["OPENAI_API_KEY"] = "..."
```
If you want to set the API key dynamically, you can use the openai_api_key parameter when initiating OpenAI class—for instance, each user's API key.
```python
from langchain.llms import OpenAI
llm = OpenAI(openai_api_key="OPENAI_API_KEY")
```
## Building a Language Model Application: LLMs

View File

@@ -4,7 +4,9 @@ This is a collection of `LangChain` tutorials on `YouTube`.
⛓ icon marks a new video [last update 2023-05-15]
###
[LangChain Tutorials](https://www.youtube.com/watch?v=FuqdVNB_8c0&list=PL9V0lbeJ69brU-ojMpU1Y7Ic58Tap0Cw6) by [Edrick](https://www.youtube.com/@edrickdch):
- ⛓ [LangChain, Chroma DB, OpenAI Beginner Guide | ChatGPT with your PDF](https://youtu.be/FuqdVNB_8c0)
[LangChain Crash Course: Build an AutoGPT app in 25 minutes](https://youtu.be/MlK6SIjcjE8) by [Nicholas Renotte](https://www.youtube.com/@NicholasRenotte)

View File

@@ -39,7 +39,7 @@ Modules
-----------
| These modules are the core abstractions which we view as the building blocks of any LLM-powered application.
For each module LangChain provides standard, extendable interfaces. LanghChain also provides external integrations and even end-to-end implementations for off-the-shelf use.
For each module LangChain provides standard, extendable interfaces. LangChain also provides external integrations and even end-to-end implementations for off-the-shelf use.
| The docs for each module contain quickstart examples, how-to guides, reference docs, and conceptual guides.
@@ -67,8 +67,8 @@ For each module LangChain provides standard, extendable interfaces. LanghChain a
./modules/models.rst
./modules/prompts.rst
./modules/indexes.md
./modules/memory.md
./modules/indexes.md
./modules/chains.md
./modules/agents.md
./modules/callbacks/getting_started.ipynb
@@ -115,8 +115,8 @@ Use Cases
./use_cases/tabular.rst
./use_cases/code.md
./use_cases/apis.md
./use_cases/summarization.md
./use_cases/extraction.md
./use_cases/summarization.md
./use_cases/evaluation.rst
@@ -126,7 +126,10 @@ Reference Docs
| Full documentation on all methods, classes, installation methods, and integration setups for LangChain.
- `LangChain Installation <./reference/installation.html>`_
- `Reference Documentation <./reference.html>`_
.. toctree::
:maxdepth: 1
:caption: Reference
@@ -134,25 +137,34 @@ Reference Docs
:hidden:
./reference/installation.md
./reference/integrations.md
./reference.rst
LangChain Ecosystem
-------------------
Ecosystem
------------
| Guides for how other companies/products can be used with LangChain.
| LangChain integrates a lot of different LLMs, systems, and products.
| From the other side, many systems and products depend on LangChain.
| It creates a vibrant and thriving ecosystem.
- `Integrations <./integrations.html>`_: Guides for how other products can be used with LangChain.
- `Dependents <./dependents.html>`_: List of repositories that use LangChain.
- `Deployments <./ecosystem/deployments.html>`_: A collection of instructions, code snippets, and template repositories for deploying LangChain apps.
- `LangChain Ecosystem <./ecosystem.html>`_
.. toctree::
:maxdepth: 1
:maxdepth: 2
:glob:
:caption: Ecosystem
:name: ecosystem
:hidden:
./ecosystem.rst
./integrations.rst
./dependents.md
./ecosystem/deployments.md
Additional Resources
@@ -162,9 +174,7 @@ Additional Resources
- `LangChainHub <https://github.com/hwchase17/langchain-hub>`_: The LangChainHub is a place to share and explore other prompts, chains, and agents.
- `Gallery <./additional_resources/gallery.html>`_: A collection of our favorite projects that use LangChain. Useful for finding inspiration or seeing how things were done in other applications.
- `Deployments <./additional_resources/deployments.html>`_: A collection of instructions, code snippets, and template repositories for deploying LangChain apps.
- `Gallery <https://github.com/kyrolabs/awesome-langchain>`_: A collection of great projects that use Langchain, compiled by the folks at `Kyrolabs <https://kyrolabs.com>`_. Useful for finding inspiration and example implementations.
- `Tracing <./additional_resources/tracing.html>`_: A guide on using tracing in LangChain to visualize the execution of chains and agents.
@@ -184,8 +194,7 @@ Additional Resources
:hidden:
LangChainHub <https://github.com/hwchase17/langchain-hub>
./additional_resources/gallery.rst
./additional_resources/deployments.md
Gallery <https://github.com/kyrolabs/awesome-langchain>
./additional_resources/tracing.md
./additional_resources/model_laboratory.ipynb
Discord <https://discord.gg/6adMQxSpJS>

View File

@@ -1,12 +1,13 @@
LangChain Ecosystem
Integrations
===================
Guides for how other companies/products can be used with LangChain
LangChain integrates with many LLMs, systems, and products.
Groups
----------
Integrations by Module
--------------------------------
| Integrations grouped by the core LangChain module they map to:
LangChain provides integration with many LLMs and systems:
- `LLM Providers <./modules/models/llms/integrations.html>`_
- `Chat Model Providers <./modules/models/chat/integrations.html>`_
@@ -18,12 +19,15 @@ LangChain provides integration with many LLMs and systems:
- `Tool Providers <./modules/agents/tools.html>`_
- `Toolkit Integrations <./modules/agents/toolkits.html>`_
Companies / Products
----------
All Integrations
-------------------------------------------
| A comprehensive list of LLMs, systems, and products integrated with LangChain:
.. toctree::
:maxdepth: 1
:glob:
ecosystem/*
integrations/*

92
docs/integrations/beam.md Normal file
View File

@@ -0,0 +1,92 @@
# Beam
This page covers how to use Beam within LangChain.
It is broken into two parts: installation and setup, and then references to specific Beam wrappers.
## Installation and Setup
- [Create an account](https://www.beam.cloud/)
- Install the Beam CLI with `curl https://raw.githubusercontent.com/slai-labs/get-beam/main/get-beam.sh -sSfL | sh`
- Register API keys with `beam configure`
- Set environment variables (`BEAM_CLIENT_ID`) and (`BEAM_CLIENT_SECRET`)
- Install the Beam SDK `pip install beam-sdk`
## Wrappers
### LLM
There exists a Beam LLM wrapper, which you can access with
```python
from langchain.llms.beam import Beam
```
## Define your Beam app.
This is the environment youll be developing against once you start the app.
It's also used to define the maximum response length from the model.
```python
llm = Beam(model_name="gpt2",
name="langchain-gpt2-test",
cpu=8,
memory="32Gi",
gpu="A10G",
python_version="python3.8",
python_packages=[
"diffusers[torch]>=0.10",
"transformers",
"torch",
"pillow",
"accelerate",
"safetensors",
"xformers",],
max_length="50",
verbose=False)
```
## Deploy your Beam app
Once defined, you can deploy your Beam app by calling your model's `_deploy()` method.
```python
llm._deploy()
```
## Call your Beam app
Once a beam model is deployed, it can be called by callying your model's `_call()` method.
This returns the GPT2 text response to your prompt.
```python
response = llm._call("Running machine learning on a remote GPU")
```
An example script which deploys the model and calls it would be:
```python
from langchain.llms.beam import Beam
import time
llm = Beam(model_name="gpt2",
name="langchain-gpt2-test",
cpu=8,
memory="32Gi",
gpu="A10G",
python_version="python3.8",
python_packages=[
"diffusers[torch]>=0.10",
"transformers",
"torch",
"pillow",
"accelerate",
"safetensors",
"xformers",],
max_length="50",
verbose=False)
llm._deploy()
response = llm._call("Running machine learning on a remote GPU")
print(response)
```

View File

@@ -0,0 +1,57 @@
# C Transformers
This page covers how to use the [C Transformers](https://github.com/marella/ctransformers) library within LangChain.
It is broken into two parts: installation and setup, and then references to specific C Transformers wrappers.
## Installation and Setup
- Install the Python package with `pip install ctransformers`
- Download a supported [GGML model](https://huggingface.co/TheBloke) (see [Supported Models](https://github.com/marella/ctransformers#supported-models))
## Wrappers
### LLM
There exists a CTransformers LLM wrapper, which you can access with:
```python
from langchain.llms import CTransformers
```
It provides a unified interface for all models:
```python
llm = CTransformers(model='/path/to/ggml-gpt-2.bin', model_type='gpt2')
print(llm('AI is going to'))
```
If you are getting `illegal instruction` error, try using `lib='avx'` or `lib='basic'`:
```py
llm = CTransformers(model='/path/to/ggml-gpt-2.bin', model_type='gpt2', lib='avx')
```
It can be used with models hosted on the Hugging Face Hub:
```py
llm = CTransformers(model='marella/gpt-2-ggml')
```
If a model repo has multiple model files (`.bin` files), specify a model file using:
```py
llm = CTransformers(model='marella/gpt-2-ggml', model_file='ggml-model.bin')
```
Additional parameters can be passed using the `config` parameter:
```py
config = {'max_new_tokens': 256, 'repetition_penalty': 1.1}
llm = CTransformers(model='marella/gpt-2-ggml', config=config)
```
See [Documentation](https://github.com/marella/ctransformers#config) for a list of available parameters.
For a more detailed walkthrough of this, see [this notebook](../modules/models/llms/integrations/ctransformers.ipynb).

View File

@@ -0,0 +1,280 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Databricks\n",
"\n",
"This notebook covers how to connect to the [Databricks runtimes](https://docs.databricks.com/runtime/index.html) and [Databricks SQL](https://www.databricks.com/product/databricks-sql) using the SQLDatabase wrapper of LangChain.\n",
"It is broken into 3 parts: installation and setup, connecting to Databricks, and examples."
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"## Installation and Setup"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 1,
"outputs": [],
"source": [
"!pip install databricks-sql-connector"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"## Connecting to Databricks\n",
"\n",
"You can connect to [Databricks runtimes](https://docs.databricks.com/runtime/index.html) and [Databricks SQL](https://www.databricks.com/product/databricks-sql) using the `SQLDatabase.from_databricks()` method.\n",
"\n",
"### Syntax\n",
"```python\n",
"SQLDatabase.from_databricks(\n",
" catalog: str,\n",
" schema: str,\n",
" host: Optional[str] = None,\n",
" api_token: Optional[str] = None,\n",
" warehouse_id: Optional[str] = None,\n",
" cluster_id: Optional[str] = None,\n",
" engine_args: Optional[dict] = None,\n",
" **kwargs: Any)\n",
"```\n",
"### Required Parameters\n",
"* `catalog`: The catalog name in the Databricks database.\n",
"* `schema`: The schema name in the catalog.\n",
"\n",
"### Optional Parameters\n",
"There following parameters are optional. When executing the method in a Databricks notebook, you don't need to provide them in most of the cases.\n",
"* `host`: The Databricks workspace hostname, excluding 'https://' part. Defaults to 'DATABRICKS_HOST' environment variable or current workspace if in a Databricks notebook.\n",
"* `api_token`: The Databricks personal access token for accessing the Databricks SQL warehouse or the cluster. Defaults to 'DATABRICKS_API_TOKEN' environment variable or a temporary one is generated if in a Databricks notebook.\n",
"* `warehouse_id`: The warehouse ID in the Databricks SQL.\n",
"* `cluster_id`: The cluster ID in the Databricks Runtime. If running in a Databricks notebook and both 'warehouse_id' and 'cluster_id' are None, it uses the ID of the cluster the notebook is attached to.\n",
"* `engine_args`: The arguments to be used when connecting Databricks.\n",
"* `**kwargs`: Additional keyword arguments for the `SQLDatabase.from_uri` method."
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"## Examples"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 2,
"outputs": [],
"source": [
"# Connecting to Databricks with SQLDatabase wrapper\n",
"from langchain import SQLDatabase\n",
"\n",
"db = SQLDatabase.from_databricks(catalog='samples', schema='nyctaxi')"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 3,
"outputs": [],
"source": [
"# Creating a OpenAI Chat LLM wrapper\n",
"from langchain.chat_models import ChatOpenAI\n",
"\n",
"llm = ChatOpenAI(temperature=0, model_name=\"gpt-4\")"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"### SQL Chain example\n",
"\n",
"This example demonstrates the use of the [SQL Chain](https://python.langchain.com/en/latest/modules/chains/examples/sqlite.html) for answering a question over a Databricks database."
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 4,
"id": "36f2270b",
"metadata": {},
"outputs": [],
"source": [
"from langchain import SQLDatabaseChain\n",
"\n",
"db_chain = SQLDatabaseChain.from_llm(llm, db, verbose=True)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "4e2b5f25",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001B[1m> Entering new SQLDatabaseChain chain...\u001B[0m\n",
"What is the average duration of taxi rides that start between midnight and 6am?\n",
"SQLQuery:\u001B[32;1m\u001B[1;3mSELECT AVG(UNIX_TIMESTAMP(tpep_dropoff_datetime) - UNIX_TIMESTAMP(tpep_pickup_datetime)) as avg_duration\n",
"FROM trips\n",
"WHERE HOUR(tpep_pickup_datetime) >= 0 AND HOUR(tpep_pickup_datetime) < 6\u001B[0m\n",
"SQLResult: \u001B[33;1m\u001B[1;3m[(987.8122786304605,)]\u001B[0m\n",
"Answer:\u001B[32;1m\u001B[1;3mThe average duration of taxi rides that start between midnight and 6am is 987.81 seconds.\u001B[0m\n",
"\u001B[1m> Finished chain.\u001B[0m\n"
]
},
{
"data": {
"text/plain": "'The average duration of taxi rides that start between midnight and 6am is 987.81 seconds.'"
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"db_chain.run(\"What is the average duration of taxi rides that start between midnight and 6am?\")"
]
},
{
"cell_type": "markdown",
"source": [
"### SQL Database Agent example\n",
"\n",
"This example demonstrates the use of the [SQL Database Agent](https://python.langchain.com/en/latest/modules/agents/toolkits/examples/sql_database.html) for answering questions over a Databricks database."
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 7,
"id": "9918e86a",
"metadata": {},
"outputs": [],
"source": [
"from langchain.agents import create_sql_agent\n",
"from langchain.agents.agent_toolkits import SQLDatabaseToolkit\n",
"\n",
"toolkit = SQLDatabaseToolkit(db=db, llm=llm)\n",
"agent = create_sql_agent(\n",
" llm=llm,\n",
" toolkit=toolkit,\n",
" verbose=True\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "c484a76e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001B[1m> Entering new AgentExecutor chain...\u001B[0m\n",
"\u001B[32;1m\u001B[1;3mAction: list_tables_sql_db\n",
"Action Input: \u001B[0m\n",
"Observation: \u001B[38;5;200m\u001B[1;3mtrips\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mI should check the schema of the trips table to see if it has the necessary columns for trip distance and duration.\n",
"Action: schema_sql_db\n",
"Action Input: trips\u001B[0m\n",
"Observation: \u001B[33;1m\u001B[1;3m\n",
"CREATE TABLE trips (\n",
"\ttpep_pickup_datetime TIMESTAMP, \n",
"\ttpep_dropoff_datetime TIMESTAMP, \n",
"\ttrip_distance FLOAT, \n",
"\tfare_amount FLOAT, \n",
"\tpickup_zip INT, \n",
"\tdropoff_zip INT\n",
") USING DELTA\n",
"\n",
"/*\n",
"3 rows from trips table:\n",
"tpep_pickup_datetime\ttpep_dropoff_datetime\ttrip_distance\tfare_amount\tpickup_zip\tdropoff_zip\n",
"2016-02-14 16:52:13+00:00\t2016-02-14 17:16:04+00:00\t4.94\t19.0\t10282\t10171\n",
"2016-02-04 18:44:19+00:00\t2016-02-04 18:46:00+00:00\t0.28\t3.5\t10110\t10110\n",
"2016-02-17 17:13:57+00:00\t2016-02-17 17:17:55+00:00\t0.7\t5.0\t10103\t10023\n",
"*/\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mThe trips table has the necessary columns for trip distance and duration. I will write a query to find the longest trip distance and its duration.\n",
"Action: query_checker_sql_db\n",
"Action Input: SELECT trip_distance, tpep_dropoff_datetime - tpep_pickup_datetime as duration FROM trips ORDER BY trip_distance DESC LIMIT 1\u001B[0m\n",
"Observation: \u001B[31;1m\u001B[1;3mSELECT trip_distance, tpep_dropoff_datetime - tpep_pickup_datetime as duration FROM trips ORDER BY trip_distance DESC LIMIT 1\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mThe query is correct. I will now execute it to find the longest trip distance and its duration.\n",
"Action: query_sql_db\n",
"Action Input: SELECT trip_distance, tpep_dropoff_datetime - tpep_pickup_datetime as duration FROM trips ORDER BY trip_distance DESC LIMIT 1\u001B[0m\n",
"Observation: \u001B[36;1m\u001B[1;3m[(30.6, '0 00:43:31.000000000')]\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mI now know the final answer.\n",
"Final Answer: The longest trip distance is 30.6 miles and it took 43 minutes and 31 seconds.\u001B[0m\n",
"\n",
"\u001B[1m> Finished chain.\u001B[0m\n"
]
},
{
"data": {
"text/plain": "'The longest trip distance is 30.6 miles and it took 43 minutes and 31 seconds.'"
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agent.run(\"What is the longest trip distance and how long did it take?\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@@ -8,10 +8,10 @@ Docugami converts business documents into a Document XML Knowledge Graph, genera
## Quick start
1. Create a Docugami workspace: http://www.docugami.com (free trials available)
1. Create a Docugami workspace: <a href="http://www.docugami.com">http://www.docugami.com</a> (free trials available)
2. Add your documents (PDF, DOCX or DOC) and allow Docugami to ingest and cluster them into sets of similar documents, e.g. NDAs, Lease Agreements, and Service Agreements. There is no fixed set of document types supported by the system, the clusters created depend on your particular documents, and you can [change the docset assignments](https://help.docugami.com/home/working-with-the-doc-sets-view) later.
3. Create an access token via the Developer Playground for your workspace. Detailed instructions: https://help.docugami.com/home/docugami-api
4. Explore the Docugami API at https://api-docs.docugami.com/ to get a list of your processed docset IDs, or just the document IDs for a particular docset.
4. Explore the Docugami API at <a href="https://api-docs.docugami.com">https://api-docs.docugami.com</a> to get a list of your processed docset IDs, or just the document IDs for a particular docset.
6. Use the DocugamiLoader as detailed in [this notebook](../modules/indexes/document_loaders/examples/docugami.ipynb), to get rich semantic chunks for your documents.
7. Optionally, build and publish one or more [reports or abstracts](https://help.docugami.com/home/reports). This helps Docugami improve the semantic XML with better tags based on your preferences, which are then added to the DocugamiLoader output as metadata. Use techniques like [self-querying retriever](https://python.langchain.com/en/latest/modules/indexes/retrievers/examples/self_query_retriever.html) to do high accuracy Document QA.

View File

@@ -1,4 +1,4 @@
# Google Search Wrapper
# Google Search
This page covers how to use the Google Search API within LangChain.
It is broken into two parts: installation and setup, and then references to the specific Google Search wrapper.

View File

@@ -1,4 +1,4 @@
# Google Serper Wrapper
# Google Serper
This page covers how to use the [Serper](https://serper.dev) Google Search API within LangChain. Serper is a low-cost Google Search API that can be used to add answer box, knowledge graph, and organic results data from Google Search.
It is broken into two parts: setup, and then references to the specific Google Serper wrapper.

View File

@@ -0,0 +1,53 @@
# Momento
This page covers how to use the [Momento](https://gomomento.com) ecosystem within LangChain.
It is broken into two parts: installation and setup, and then references to specific Momento wrappers.
## Installation and Setup
- Sign up for a free account [here](https://docs.momentohq.com/getting-started) and get an auth token
- Install the Momento Python SDK with `pip install momento`
## Wrappers
### Cache
The Cache wrapper allows for [Momento](https://gomomento.com) to be used as a serverless, distributed, low-latency cache for LLM prompts and responses.
#### Standard Cache
The standard cache is the go-to use case for [Momento](https://gomomento.com) users in any environment.
Import the cache as follows:
```python
from langchain.cache import MomentoCache
```
And set up like so:
```python
from datetime import timedelta
from momento import CacheClient, Configurations, CredentialProvider
import langchain
# Instantiate the Momento client
cache_client = CacheClient(
Configurations.Laptop.v1(),
CredentialProvider.from_environment_variable("MOMENTO_AUTH_TOKEN"),
default_ttl=timedelta(days=1))
# Choose a Momento cache name of your choice
cache_name = "langchain"
# Instantiate the LLM cache
langchain.llm_cache = MomentoCache(cache_client, cache_name)
```
### Memory
Momento can be used as a distributed memory store for LLMs.
#### Chat Message History Memory
See [this notebook](../modules/memory/examples/momento_chat_message_history.ipynb) for a walkthrough of how to use Momento as a memory store for chat message history.

View File

@@ -0,0 +1,20 @@
# Psychic
This page covers how to use [Psychic](https://www.psychic.dev/) within LangChain.
## What is Psychic?
Psychic is a platform for integrating with your customers SaaS tools like Notion, Zendesk, Confluence, and Google Drive via OAuth and syncing documents from these applications to your SQL or vector database. You can think of it like Plaid for unstructured data. Psychic is easy to set up - you use it by importing the react library and configuring it with your Sidekick API key, which you can get from the [Psychic dashboard](https://dashboard.psychic.dev/). When your users connect their applications, you can view these connections from the dashboard and retrieve data using the server-side libraries.
## Quick start
1. Create an account in the [dashboard](https://dashboard.psychic.dev/).
2. Use the [react library](https://docs.psychic.dev/sidekick-link) to add the Psychic link modal to your frontend react app. Users will use this to connect their SaaS apps.
3. Once your user has created a connection, you can use the langchain PsychicLoader by following the [example notebook](../modules/indexes/document_loaders/examples/psychic.ipynb)
# Advantages vs Other Document Loaders
1. **Universal API:** Instead of building OAuth flows and learning the APIs for every SaaS app, you integrate Psychic once and leverage our universal API to retrieve data.
2. **Data Syncs:** Data in your customers' SaaS apps can get stale fast. With Psychic you can configure webhooks to keep your documents up to date on a daily or realtime basis.
3. **Simplified OAuth:** Psychic handles OAuth end-to-end so that you don't have to spend time creating OAuth clients for each integration, keeping access tokens fresh, and handling OAuth redirect logic.

View File

@@ -0,0 +1,40 @@
# Vectara
What is Vectara?
**Vectara Overview:**
- Vectara is developer-first API platform for building conversational search applications
- To use Vectara - first [sign up](https://console.vectara.com/signup) and create an account. Then create a corpus and an API key for indexing and searching.
- You can use Vectara's [indexing API](https://docs.vectara.com/docs/indexing-apis/indexing) to add documents into Vectara's index
- You can use Vectara's [Search API](https://docs.vectara.com/docs/search-apis/search) to query Vectara's index (which also supports Hybrid search implicitly).
- You can use Vectara's integration with LangChain as a Vector store or using the Retriever abstraction.
## Installation and Setup
To use Vectara with LangChain no special installation steps are required. You just have to provide your customer_id, corpus ID, and an API key created within the Vectara console to enable indexing and searching.
### VectorStore
There exists a wrapper around the Vectara platform, allowing you to use it as a vectorstore, whether for semantic search or example selection.
To import this vectorstore:
```python
from langchain.vectorstores import Vectara
```
To create an instance of the Vectara vectorstore:
```python
vectara = Vectara(
vectara_customer_id=customer_id,
vectara_corpus_id=corpus_id,
vectara_api_key=api_key
)
```
The customer_id, corpus_id and api_key are optional, and if they are not supplied will be read from the environment variables `VECTARA_CUSTOMER_ID`, `VECTARA_CORPUS_ID` and `VECTARA_API_KEY`, respectively.
For a more detailed walkthrough of the Vectara wrapper, see one of the two example notebooks:
* [Chat Over Documents with Vectara](./vectara/vectara_chat.html)
* [Vectara Text Generation](./vectara/vectara_text_generation.html)

View File

@@ -0,0 +1,726 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "134a0785",
"metadata": {},
"source": [
"# Chat Over Documents with Vectara\n",
"\n",
"This notebook is based on the [chat_vector_db](https://github.com/hwchase17/langchain/blob/master/docs/modules/chains/index_examples/chat_vector_db.ipynb) notebook, but using Vectara as the vector database."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "70c4e529",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import os\n",
"from langchain.vectorstores import Vectara\n",
"from langchain.vectorstores.vectara import VectaraRetriever\n",
"from langchain.llms import OpenAI\n",
"from langchain.chains import ConversationalRetrievalChain"
]
},
{
"cell_type": "markdown",
"id": "cdff94be",
"metadata": {},
"source": [
"Load in documents. You can replace this with a loader for whatever type of data you want"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "01c46e92",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langchain.document_loaders import TextLoader\n",
"loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n",
"documents = loader.load()"
]
},
{
"cell_type": "markdown",
"id": "239475d2",
"metadata": {},
"source": [
"We now split the documents, create embeddings for them, and put them in a vectorstore. This allows us to do semantic search over them."
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "a8930cf7",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"vectorstore = Vectara.from_documents(documents, embedding=None)"
]
},
{
"cell_type": "markdown",
"id": "898b574b",
"metadata": {},
"source": [
"We can now create a memory object, which is neccessary to track the inputs/outputs and hold a conversation."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "af803fee",
"metadata": {},
"outputs": [],
"source": [
"from langchain.memory import ConversationBufferMemory\n",
"memory = ConversationBufferMemory(memory_key=\"chat_history\", return_messages=True)"
]
},
{
"cell_type": "markdown",
"id": "3c96b118",
"metadata": {},
"source": [
"We now initialize the `ConversationalRetrievalChain`"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "7b4110f3",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'langchain.vectorstores.vectara.Vectara'>\n"
]
}
],
"source": [
"openai_api_key = os.environ['OPENAI_API_KEY']\n",
"llm = OpenAI(openai_api_key=openai_api_key, temperature=0)\n",
"retriever = VectaraRetriever(vectorstore, alpha=0.025, k=5, filter=None)\n",
"\n",
"print(type(vectorstore))\n",
"d = retriever.get_relevant_documents('What did the president say about Ketanji Brown Jackson')\n",
"\n",
"qa = ConversationalRetrievalChain.from_llm(llm, retriever, memory=memory)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "e8ce4fe9",
"metadata": {},
"outputs": [],
"source": [
"query = \"What did the president say about Ketanji Brown Jackson\"\n",
"result = qa({\"question\": query})"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "4c79862b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"\" The president said that Ketanji Brown Jackson is one of the nation's top legal minds, a former top litigator in private practice, and a former federal public defender.\""
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result[\"answer\"]"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "c697d9d1",
"metadata": {},
"outputs": [],
"source": [
"query = \"Did he mention who she suceeded\"\n",
"result = qa({\"question\": query})"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "ba0678f3",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"' Justice Stephen Breyer.'"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result['answer']"
]
},
{
"cell_type": "markdown",
"id": "b3308b01-5300-4999-8cd3-22f16dae757e",
"metadata": {},
"source": [
"## Pass in chat history\n",
"\n",
"In the above example, we used a Memory object to track chat history. We can also just pass it in explicitly. In order to do this, we need to initialize a chain without any memory object."
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "1b41a10b-bf68-4689-8f00-9aed7675e2ab",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"qa = ConversationalRetrievalChain.from_llm(OpenAI(temperature=0), vectorstore.as_retriever())"
]
},
{
"cell_type": "markdown",
"id": "83f38c18-ac82-45f4-a79e-8b37ce1ae115",
"metadata": {},
"source": [
"Here's an example of asking a question with no chat history"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "bc672290-8a8b-4828-a90c-f1bbdd6b3920",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"chat_history = []\n",
"query = \"What did the president say about Ketanji Brown Jackson\"\n",
"result = qa({\"question\": query, \"chat_history\": chat_history})"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "6b62d758-c069-4062-88f0-21e7ea4710bf",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"\" The president said that Ketanji Brown Jackson is one of the nation's top legal minds, a former top litigator in private practice, and a former federal public defender.\""
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result[\"answer\"]"
]
},
{
"cell_type": "markdown",
"id": "8c26a83d-c945-4458-b54a-c6bd7f391303",
"metadata": {},
"source": [
"Here's an example of asking a question with some chat history"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "9c95460b-7116-4155-a9d2-c0fb027ee592",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"chat_history = [(query, result[\"answer\"])]\n",
"query = \"Did he mention who she suceeded\"\n",
"result = qa({\"question\": query, \"chat_history\": chat_history})"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "698ac00c-cadc-407f-9423-226b2d9258d0",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"' Justice Stephen Breyer.'"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result['answer']"
]
},
{
"cell_type": "markdown",
"id": "0eaadf0f",
"metadata": {},
"source": [
"## Return Source Documents\n",
"You can also easily return source documents from the ConversationalRetrievalChain. This is useful for when you want to inspect what documents were returned."
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "562769c6",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"qa = ConversationalRetrievalChain.from_llm(llm, vectorstore.as_retriever(), return_source_documents=True)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "ea478300",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"chat_history = []\n",
"query = \"What did the president say about Ketanji Brown Jackson\"\n",
"result = qa({\"question\": query, \"chat_history\": chat_history})"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "4cb75b4e",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"Document(page_content='Tonight, Id like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nations top legal minds, who will continue Justice Breyers legacy of excellence. A former top litigator in private practice. A former federal public defender.', metadata={'source': '../../modules/state_of_the_union.txt'})"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result['source_documents'][0]"
]
},
{
"cell_type": "markdown",
"id": "669ede2f-d69f-4960-8468-8a768ce1a55f",
"metadata": {},
"source": [
"## ConversationalRetrievalChain with `search_distance`\n",
"If you are using a vector store that supports filtering by search distance, you can add a threshold value parameter."
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "f4f32c6f-8e49-44af-9116-8830b1fcc5f2",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"vectordbkwargs = {\"search_distance\": 0.9}"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "1e251775-31e7-4679-b744-d4a57937f93a",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"qa = ConversationalRetrievalChain.from_llm(OpenAI(temperature=0), vectorstore.as_retriever(), return_source_documents=True)\n",
"chat_history = []\n",
"query = \"What did the president say about Ketanji Brown Jackson\"\n",
"result = qa({\"question\": query, \"chat_history\": chat_history, \"vectordbkwargs\": vectordbkwargs})"
]
},
{
"cell_type": "markdown",
"id": "99b96dae",
"metadata": {},
"source": [
"## ConversationalRetrievalChain with `map_reduce`\n",
"We can also use different types of combine document chains with the ConversationalRetrievalChain chain."
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "e53a9d66",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langchain.chains import LLMChain\n",
"from langchain.chains.question_answering import load_qa_chain\n",
"from langchain.chains.conversational_retrieval.prompts import CONDENSE_QUESTION_PROMPT"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "bf205e35",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"question_generator = LLMChain(llm=llm, prompt=CONDENSE_QUESTION_PROMPT)\n",
"doc_chain = load_qa_chain(llm, chain_type=\"map_reduce\")\n",
"\n",
"chain = ConversationalRetrievalChain(\n",
" retriever=vectorstore.as_retriever(),\n",
" question_generator=question_generator,\n",
" combine_docs_chain=doc_chain,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "78155887",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"chat_history = []\n",
"query = \"What did the president say about Ketanji Brown Jackson\"\n",
"result = chain({\"question\": query, \"chat_history\": chat_history})"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "e54b5fa2",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"' The president did not mention Ketanji Brown Jackson.'"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result['answer']"
]
},
{
"cell_type": "markdown",
"id": "a2fe6b14",
"metadata": {},
"source": [
"## ConversationalRetrievalChain with Question Answering with sources\n",
"\n",
"You can also use this chain with the question answering with sources chain."
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "d1058fd2",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langchain.chains.qa_with_sources import load_qa_with_sources_chain"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "a6594482",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"\n",
"question_generator = LLMChain(llm=llm, prompt=CONDENSE_QUESTION_PROMPT)\n",
"doc_chain = load_qa_with_sources_chain(llm, chain_type=\"map_reduce\")\n",
"\n",
"chain = ConversationalRetrievalChain(\n",
" retriever=vectorstore.as_retriever(),\n",
" question_generator=question_generator,\n",
" combine_docs_chain=doc_chain,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "e2badd21",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"chat_history = []\n",
"query = \"What did the president say about Ketanji Brown Jackson\"\n",
"result = chain({\"question\": query, \"chat_history\": chat_history})"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "edb31fe5",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"' The president did not mention Ketanji Brown Jackson.\\nSOURCES: ../../modules/state_of_the_union.txt'"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result['answer']"
]
},
{
"cell_type": "markdown",
"id": "2324cdc6-98bf-4708-b8cd-02a98b1e5b67",
"metadata": {},
"source": [
"## ConversationalRetrievalChain with streaming to `stdout`\n",
"\n",
"Output from the chain will be streamed to `stdout` token by token in this example."
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "2efacec3-2690-4b05-8de3-a32fd2ac3911",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langchain.chains.llm import LLMChain\n",
"from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler\n",
"from langchain.chains.conversational_retrieval.prompts import CONDENSE_QUESTION_PROMPT, QA_PROMPT\n",
"from langchain.chains.question_answering import load_qa_chain\n",
"\n",
"# Construct a ConversationalRetrievalChain with a streaming llm for combine docs\n",
"# and a separate, non-streaming llm for question generation\n",
"llm = OpenAI(temperature=0, openai_api_key=openai_api_key)\n",
"streaming_llm = OpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()], temperature=0, openai_api_key=openai_api_key)\n",
"\n",
"question_generator = LLMChain(llm=llm, prompt=CONDENSE_QUESTION_PROMPT)\n",
"doc_chain = load_qa_chain(streaming_llm, chain_type=\"stuff\", prompt=QA_PROMPT)\n",
"\n",
"qa = ConversationalRetrievalChain(\n",
" retriever=vectorstore.as_retriever(), combine_docs_chain=doc_chain, question_generator=question_generator)"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "fd6d43f4-7428-44a4-81bc-26fe88a98762",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" The president said that Ketanji Brown Jackson is one of the nation's top legal minds, a former top litigator in private practice, and a former federal public defender."
]
}
],
"source": [
"chat_history = []\n",
"query = \"What did the president say about Ketanji Brown Jackson\"\n",
"result = qa({\"question\": query, \"chat_history\": chat_history})"
]
},
{
"cell_type": "code",
"execution_count": 30,
"id": "5ab38978-f3e8-4fa7-808c-c79dec48379a",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Justice Stephen Breyer."
]
}
],
"source": [
"chat_history = [(query, result[\"answer\"])]\n",
"query = \"Did he mention who she suceeded\"\n",
"result = qa({\"question\": query, \"chat_history\": chat_history})\n"
]
},
{
"cell_type": "markdown",
"id": "f793d56b",
"metadata": {},
"source": [
"## get_chat_history Function\n",
"You can also specify a `get_chat_history` function, which can be used to format the chat_history string."
]
},
{
"cell_type": "code",
"execution_count": 31,
"id": "a7ba9d8c",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"def get_chat_history(inputs) -> str:\n",
" res = []\n",
" for human, ai in inputs:\n",
" res.append(f\"Human:{human}\\nAI:{ai}\")\n",
" return \"\\n\".join(res)\n",
"qa = ConversationalRetrievalChain.from_llm(llm, vectorstore.as_retriever(), get_chat_history=get_chat_history)"
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "a3e33c0d",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"chat_history = []\n",
"query = \"What did the president say about Ketanji Brown Jackson\"\n",
"result = qa({\"question\": query, \"chat_history\": chat_history})"
]
},
{
"cell_type": "code",
"execution_count": 33,
"id": "936dc62f",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"\" The president said that Ketanji Brown Jackson is one of the nation's top legal minds, a former top litigator in private practice, and a former federal public defender.\""
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"result['answer']"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b8c26901",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@@ -0,0 +1,199 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Vectara Text Generation\n",
"\n",
"This notebook is based on [chat_vector_db](https://github.com/hwchase17/langchain/blob/master/docs/modules/chains/index_examples/question_answering.ipynb) and adapted to Vectara."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Prepare Data\n",
"\n",
"First, we prepare the data. For this example, we fetch a documentation site that consists of markdown files hosted on Github and split them into small enough Documents."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from langchain.llms import OpenAI\n",
"from langchain.docstore.document import Document\n",
"import requests\n",
"from langchain.vectorstores import Vectara\n",
"from langchain.text_splitter import CharacterTextSplitter\n",
"from langchain.prompts import PromptTemplate\n",
"import pathlib\n",
"import subprocess\n",
"import tempfile"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Cloning into '.'...\n"
]
}
],
"source": [
"def get_github_docs(repo_owner, repo_name):\n",
" with tempfile.TemporaryDirectory() as d:\n",
" subprocess.check_call(\n",
" f\"git clone --depth 1 https://github.com/{repo_owner}/{repo_name}.git .\",\n",
" cwd=d,\n",
" shell=True,\n",
" )\n",
" git_sha = (\n",
" subprocess.check_output(\"git rev-parse HEAD\", shell=True, cwd=d)\n",
" .decode(\"utf-8\")\n",
" .strip()\n",
" )\n",
" repo_path = pathlib.Path(d)\n",
" markdown_files = list(repo_path.glob(\"*/*.md\")) + list(\n",
" repo_path.glob(\"*/*.mdx\")\n",
" )\n",
" for markdown_file in markdown_files:\n",
" with open(markdown_file, \"r\") as f:\n",
" relative_path = markdown_file.relative_to(repo_path)\n",
" github_url = f\"https://github.com/{repo_owner}/{repo_name}/blob/{git_sha}/{relative_path}\"\n",
" yield Document(page_content=f.read(), metadata={\"source\": github_url})\n",
"\n",
"sources = get_github_docs(\"yirenlu92\", \"deno-manual-forked\")\n",
"\n",
"source_chunks = []\n",
"splitter = CharacterTextSplitter(separator=\" \", chunk_size=1024, chunk_overlap=0)\n",
"for source in sources:\n",
" for chunk in splitter.split_text(source.page_content):\n",
" source_chunks.append(chunk)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Set Up Vector DB\n",
"\n",
"Now that we have the documentation content in chunks, let's put all this information in a vector index for easy retrieval."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"search_index = Vectara.from_texts(source_chunks, embedding=None)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Set Up LLM Chain with Custom Prompt\n",
"\n",
"Next, let's set up a simple LLM chain but give it a custom prompt for blog post generation. Note that the custom prompt is parameterized and takes two inputs: `context`, which will be the documents fetched from the vector search, and `topic`, which is given by the user."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"from langchain.chains import LLMChain\n",
"prompt_template = \"\"\"Use the context below to write a 400 word blog post about the topic below:\n",
" Context: {context}\n",
" Topic: {topic}\n",
" Blog post:\"\"\"\n",
"\n",
"PROMPT = PromptTemplate(\n",
" template=prompt_template, input_variables=[\"context\", \"topic\"]\n",
")\n",
"\n",
"llm = OpenAI(openai_api_key=os.environ['OPENAI_API_KEY'], temperature=0)\n",
"\n",
"chain = LLMChain(llm=llm, prompt=PROMPT)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Generate Text\n",
"\n",
"Finally, we write a function to apply our inputs to the chain. The function takes an input parameter `topic`. We find the documents in the vector index that correspond to that `topic`, and use them as additional context in our simple LLM chain."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"def generate_blog_post(topic):\n",
" docs = search_index.similarity_search(topic, k=4)\n",
" inputs = [{\"context\": doc.page_content, \"topic\": topic} for doc in docs]\n",
" print(chain.apply(inputs))"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[{'text': '\\n\\nEnvironment variables are an essential part of any development workflow. They provide a way to store and access information that is specific to the environment in which the code is running. This can be especially useful when working with different versions of a language or framework, or when running code on different machines.\\n\\nThe Deno CLI tasks extension provides a way to easily manage environment variables when running Deno commands. This extension provides a task definition for allowing you to create tasks that execute the `deno` CLI from within the editor. The template for the Deno CLI tasks has the following interface, which can be configured in a `tasks.json` within your workspace:\\n\\nThe task definition includes the `type` field, which should be set to `deno`, and the `command` field, which is the `deno` command to run (e.g. `run`, `test`, `cache`, etc.). Additionally, you can specify additional arguments to pass on the command line, the current working directory to execute the command, and any environment variables.\\n\\nUsing environment variables with the Deno CLI tasks extension is a great way to ensure that your code is running in the correct environment. For example, if you are running a test suite,'}, {'text': '\\n\\nEnvironment variables are an important part of any programming language, and they can be used to store and access data in a variety of ways. In this blog post, we\\'ll be taking a look at environment variables specifically for the shell.\\n\\nShell variables are similar to environment variables, but they won\\'t be exported to spawned commands. They are defined with the following syntax:\\n\\n```sh\\nVAR_NAME=value\\n```\\n\\nShell variables can be used to store and access data in a variety of ways. For example, you can use them to store values that you want to re-use, but don\\'t want to be available in any spawned processes.\\n\\nFor example, if you wanted to store a value and then use it in a command, you could do something like this:\\n\\n```sh\\nVAR=hello && echo $VAR && deno eval \"console.log(\\'Deno: \\' + Deno.env.get(\\'VAR\\'))\"\\n```\\n\\nThis would output the following:\\n\\n```\\nhello\\nDeno: undefined\\n```\\n\\nAs you can see, the value stored in the shell variable is not available in the spawned process.\\n\\n'}, {'text': '\\n\\nWhen it comes to developing applications, environment variables are an essential part of the process. Environment variables are used to store information that can be used by applications and scripts to customize their behavior. This is especially important when it comes to developing applications with Deno, as there are several environment variables that can impact the behavior of Deno.\\n\\nThe most important environment variable for Deno is `DENO_AUTH_TOKENS`. This environment variable is used to store authentication tokens that are used to access remote resources. This is especially important when it comes to accessing remote APIs or databases. Without the proper authentication tokens, Deno will not be able to access the remote resources.\\n\\nAnother important environment variable for Deno is `DENO_DIR`. This environment variable is used to store the directory where Deno will store its files. This includes the Deno executable, the Deno cache, and the Deno configuration files. By setting this environment variable, you can ensure that Deno will always be able to find the files it needs.\\n\\nFinally, there is the `DENO_PLUGINS` environment variable. This environment variable is used to store the list of plugins that Deno will use. This is important for customizing the'}, {'text': '\\n\\nEnvironment variables are a great way to store and access sensitive information in your Deno applications. Deno offers built-in support for environment variables with `Deno.env`, and you can also use a `.env` file to store and access environment variables. In this blog post, we\\'ll explore both of these options and how to use them in your Deno applications.\\n\\n## Built-in `Deno.env`\\n\\nThe Deno runtime offers built-in support for environment variables with [`Deno.env`](https://deno.land/api@v1.25.3?s=Deno.env). `Deno.env` has getter and setter methods. Here is example usage:\\n\\n```ts\\nDeno.env.set(\"FIREBASE_API_KEY\", \"examplekey123\");\\nDeno.env.set(\"FIREBASE_AUTH_DOMAIN\", \"firebasedomain.com\");\\n\\nconsole.log(Deno.env.get(\"FIREBASE_API_KEY\")); // examplekey123\\nconsole.log(Deno.env.get(\"FIREBASE_AUTH_'}]\n"
]
}
],
"source": [
"generate_blog_post(\"environment variables\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

View File

@@ -0,0 +1,134 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# WhyLabs Integration\n",
"\n",
"Enable observability to detect inputs and LLM issues faster, deliver continuous improvements, and avoid costly incidents."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%pip install langkit -q"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"Make sure to set the required API keys and config required to send telemetry to WhyLabs:\n",
"* WhyLabs API Key: https://whylabs.ai/whylabs-free-sign-up\n",
"* Org and Dataset [https://docs.whylabs.ai/docs/whylabs-onboarding](https://docs.whylabs.ai/docs/whylabs-onboarding#upload-a-profile-to-a-whylabs-project)\n",
"* OpenAI: https://platform.openai.com/account/api-keys\n",
"\n",
"Then you can set them like this:\n",
"\n",
"```python\n",
"import os\n",
"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"\"\n",
"os.environ[\"WHYLABS_DEFAULT_ORG_ID\"] = \"\"\n",
"os.environ[\"WHYLABS_DEFAULT_DATASET_ID\"] = \"\"\n",
"os.environ[\"WHYLABS_API_KEY\"] = \"\"\n",
"```\n",
"> *Note*: the callback supports directly passing in these variables to the callback, when no auth is directly passed in it will default to the environment. Passing in auth directly allows for writing profiles to multiple projects or organizations in WhyLabs.\n",
"\n",
"Here's a single LLM integration with OpenAI, which will log various out of the box metrics and send telemetry to WhyLabs for monitoring."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"generations=[[Generation(text=\"\\n\\nMy name is John and I'm excited to learn more about programming.\", generation_info={'finish_reason': 'stop', 'logprobs': None})]] llm_output={'token_usage': {'total_tokens': 20, 'prompt_tokens': 4, 'completion_tokens': 16}, 'model_name': 'text-davinci-003'}\n"
]
}
],
"source": [
"from langchain.llms import OpenAI\n",
"from langchain.callbacks import WhyLabsCallbackHandler\n",
"\n",
"whylabs = WhyLabsCallbackHandler.from_params()\n",
"llm = OpenAI(temperature=0, callbacks=[whylabs])\n",
"\n",
"result = llm.generate([\"Hello, World!\"])\n",
"print(result)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"generations=[[Generation(text='\\n\\n1. 123-45-6789\\n2. 987-65-4321\\n3. 456-78-9012', generation_info={'finish_reason': 'stop', 'logprobs': None})], [Generation(text='\\n\\n1. johndoe@example.com\\n2. janesmith@example.com\\n3. johnsmith@example.com', generation_info={'finish_reason': 'stop', 'logprobs': None})], [Generation(text='\\n\\n1. 123 Main Street, Anytown, USA 12345\\n2. 456 Elm Street, Nowhere, USA 54321\\n3. 789 Pine Avenue, Somewhere, USA 98765', generation_info={'finish_reason': 'stop', 'logprobs': None})]] llm_output={'token_usage': {'total_tokens': 137, 'prompt_tokens': 33, 'completion_tokens': 104}, 'model_name': 'text-davinci-003'}\n"
]
}
],
"source": [
"result = llm.generate(\n",
" [\n",
" \"Can you give me 3 SSNs so I can understand the format?\",\n",
" \"Can you give me 3 fake email addresses?\",\n",
" \"Can you give me 3 fake US mailing addresses?\",\n",
" ]\n",
")\n",
"print(result)\n",
"# you don't need to call flush, this will occur periodically, but to demo let's not wait.\n",
"whylabs.flush()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"whylabs.close()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.11.2 64-bit",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "b0fa6594d8f4cbf19f97940f81e996739fb7646882a419484c72d19e05852a7e"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}

View File

@@ -17,7 +17,7 @@ At the moment, there are two main types of agents:
When should you use each one? Action Agents are more conventional, and good for small tasks.
For more complex or long running tasks, the initial planning step helps to maintain long term objectives and focus. However, that comes at the expense of generally more calls and higher latency.
These two agents are also not mutually exclusive - in fact, it is often best to have an Action Agent be in change of the execution for the Plan and Execute agent.
These two agents are also not mutually exclusive - in fact, it is often best to have an Action Agent be in charge of the execution for the Plan and Execute agent.
Action Agents
-------------

View File

@@ -0,0 +1,371 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "6317727b",
"metadata": {},
"source": [
"# Handle Parsing Errors\n",
"\n",
"Occasionally the LLM cannot determine what step to take because it outputs format in incorrect form to be handled by the output parser. In this case, by default the agent errors. But you can easily control this functionality with `handle_parsing_errors`! Let's explore how."
]
},
{
"cell_type": "markdown",
"id": "39cc1a7b",
"metadata": {},
"source": [
"## Setup"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "33c7f220",
"metadata": {},
"outputs": [],
"source": [
"from langchain import OpenAI, LLMMathChain, SerpAPIWrapper, SQLDatabase, SQLDatabaseChain\n",
"from langchain.agents import initialize_agent, Tool\n",
"from langchain.agents import AgentType\n",
"from langchain.chat_models import ChatOpenAI\n",
"from langchain.agents.types import AGENT_TO_CLASS"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "3de22959",
"metadata": {},
"outputs": [],
"source": [
"search = SerpAPIWrapper()\n",
"tools = [\n",
" Tool(\n",
" name = \"Search\",\n",
" func=search.run,\n",
" description=\"useful for when you need to answer questions about current events. You should ask targeted questions\"\n",
" ),\n",
"]"
]
},
{
"cell_type": "markdown",
"id": "9f1fc58a",
"metadata": {},
"source": [
"## Error\n",
"\n",
"In this scenario, the agent will error (because it fails to output an Action string)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "32ad08d1",
"metadata": {},
"outputs": [],
"source": [
"mrkl = initialize_agent(\n",
" tools, \n",
" ChatOpenAI(temperature=0), \n",
" agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, \n",
" verbose=True,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "facb8895",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n"
]
},
{
"ename": "OutputParserException",
"evalue": "Could not parse LLM output: I'm sorry, but I cannot provide an answer without an Action. Please provide a valid Action in the format specified above.",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
"File \u001b[0;32m~/workplace/langchain/langchain/agents/chat/output_parser.py:21\u001b[0m, in \u001b[0;36mChatOutputParser.parse\u001b[0;34m(self, text)\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m---> 21\u001b[0m action \u001b[38;5;241m=\u001b[39m \u001b[43mtext\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msplit\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m```\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m]\u001b[49m\n\u001b[1;32m 22\u001b[0m response \u001b[38;5;241m=\u001b[39m json\u001b[38;5;241m.\u001b[39mloads(action\u001b[38;5;241m.\u001b[39mstrip())\n",
"\u001b[0;31mIndexError\u001b[0m: list index out of range",
"\nDuring handling of the above exception, another exception occurred:\n",
"\u001b[0;31mOutputParserException\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[4], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mmrkl\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mWho is Leo DiCaprio\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43ms girlfriend? No need to add Action\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n",
"File \u001b[0;32m~/workplace/langchain/langchain/chains/base.py:236\u001b[0m, in \u001b[0;36mChain.run\u001b[0;34m(self, callbacks, *args, **kwargs)\u001b[0m\n\u001b[1;32m 234\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(args) \u001b[38;5;241m!=\u001b[39m \u001b[38;5;241m1\u001b[39m:\n\u001b[1;32m 235\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m`run` supports only one positional argument.\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m--> 236\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43margs\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcallbacks\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcallbacks\u001b[49m\u001b[43m)\u001b[49m[\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moutput_keys[\u001b[38;5;241m0\u001b[39m]]\n\u001b[1;32m 238\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m kwargs \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m args:\n\u001b[1;32m 239\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m(kwargs, callbacks\u001b[38;5;241m=\u001b[39mcallbacks)[\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moutput_keys[\u001b[38;5;241m0\u001b[39m]]\n",
"File \u001b[0;32m~/workplace/langchain/langchain/chains/base.py:140\u001b[0m, in \u001b[0;36mChain.__call__\u001b[0;34m(self, inputs, return_only_outputs, callbacks)\u001b[0m\n\u001b[1;32m 138\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m (\u001b[38;5;167;01mKeyboardInterrupt\u001b[39;00m, \u001b[38;5;167;01mException\u001b[39;00m) \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 139\u001b[0m run_manager\u001b[38;5;241m.\u001b[39mon_chain_error(e)\n\u001b[0;32m--> 140\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m e\n\u001b[1;32m 141\u001b[0m run_manager\u001b[38;5;241m.\u001b[39mon_chain_end(outputs)\n\u001b[1;32m 142\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mprep_outputs(inputs, outputs, return_only_outputs)\n",
"File \u001b[0;32m~/workplace/langchain/langchain/chains/base.py:134\u001b[0m, in \u001b[0;36mChain.__call__\u001b[0;34m(self, inputs, return_only_outputs, callbacks)\u001b[0m\n\u001b[1;32m 128\u001b[0m run_manager \u001b[38;5;241m=\u001b[39m callback_manager\u001b[38;5;241m.\u001b[39mon_chain_start(\n\u001b[1;32m 129\u001b[0m {\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__class__\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m},\n\u001b[1;32m 130\u001b[0m inputs,\n\u001b[1;32m 131\u001b[0m )\n\u001b[1;32m 132\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 133\u001b[0m outputs \u001b[38;5;241m=\u001b[39m (\n\u001b[0;32m--> 134\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call\u001b[49m\u001b[43m(\u001b[49m\u001b[43minputs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mrun_manager\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mrun_manager\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 135\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m new_arg_supported\n\u001b[1;32m 136\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_call(inputs)\n\u001b[1;32m 137\u001b[0m )\n\u001b[1;32m 138\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m (\u001b[38;5;167;01mKeyboardInterrupt\u001b[39;00m, \u001b[38;5;167;01mException\u001b[39;00m) \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 139\u001b[0m run_manager\u001b[38;5;241m.\u001b[39mon_chain_error(e)\n",
"File \u001b[0;32m~/workplace/langchain/langchain/agents/agent.py:947\u001b[0m, in \u001b[0;36mAgentExecutor._call\u001b[0;34m(self, inputs, run_manager)\u001b[0m\n\u001b[1;32m 945\u001b[0m \u001b[38;5;66;03m# We now enter the agent loop (until it returns something).\u001b[39;00m\n\u001b[1;32m 946\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_should_continue(iterations, time_elapsed):\n\u001b[0;32m--> 947\u001b[0m next_step_output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_take_next_step\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 948\u001b[0m \u001b[43m \u001b[49m\u001b[43mname_to_tool_map\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 949\u001b[0m \u001b[43m \u001b[49m\u001b[43mcolor_mapping\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 950\u001b[0m \u001b[43m \u001b[49m\u001b[43minputs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 951\u001b[0m \u001b[43m \u001b[49m\u001b[43mintermediate_steps\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 952\u001b[0m \u001b[43m \u001b[49m\u001b[43mrun_manager\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mrun_manager\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 953\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 954\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(next_step_output, AgentFinish):\n\u001b[1;32m 955\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_return(\n\u001b[1;32m 956\u001b[0m next_step_output, intermediate_steps, run_manager\u001b[38;5;241m=\u001b[39mrun_manager\n\u001b[1;32m 957\u001b[0m )\n",
"File \u001b[0;32m~/workplace/langchain/langchain/agents/agent.py:773\u001b[0m, in \u001b[0;36mAgentExecutor._take_next_step\u001b[0;34m(self, name_to_tool_map, color_mapping, inputs, intermediate_steps, run_manager)\u001b[0m\n\u001b[1;32m 771\u001b[0m raise_error \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mFalse\u001b[39;00m\n\u001b[1;32m 772\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m raise_error:\n\u001b[0;32m--> 773\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m e\n\u001b[1;32m 774\u001b[0m text \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mstr\u001b[39m(e)\n\u001b[1;32m 775\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandle_parsing_errors, \u001b[38;5;28mbool\u001b[39m):\n",
"File \u001b[0;32m~/workplace/langchain/langchain/agents/agent.py:762\u001b[0m, in \u001b[0;36mAgentExecutor._take_next_step\u001b[0;34m(self, name_to_tool_map, color_mapping, inputs, intermediate_steps, run_manager)\u001b[0m\n\u001b[1;32m 756\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Take a single step in the thought-action-observation loop.\u001b[39;00m\n\u001b[1;32m 757\u001b[0m \n\u001b[1;32m 758\u001b[0m \u001b[38;5;124;03mOverride this to take control of how the agent makes and acts on choices.\u001b[39;00m\n\u001b[1;32m 759\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 760\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 761\u001b[0m \u001b[38;5;66;03m# Call the LLM to see what to do.\u001b[39;00m\n\u001b[0;32m--> 762\u001b[0m output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43magent\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mplan\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 763\u001b[0m \u001b[43m \u001b[49m\u001b[43mintermediate_steps\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 764\u001b[0m \u001b[43m \u001b[49m\u001b[43mcallbacks\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mrun_manager\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_child\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mif\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mrun_manager\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01melse\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 765\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43minputs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 766\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 767\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m OutputParserException \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 768\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandle_parsing_errors, \u001b[38;5;28mbool\u001b[39m):\n",
"File \u001b[0;32m~/workplace/langchain/langchain/agents/agent.py:444\u001b[0m, in \u001b[0;36mAgent.plan\u001b[0;34m(self, intermediate_steps, callbacks, **kwargs)\u001b[0m\n\u001b[1;32m 442\u001b[0m full_inputs \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mget_full_inputs(intermediate_steps, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[1;32m 443\u001b[0m full_output \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mllm_chain\u001b[38;5;241m.\u001b[39mpredict(callbacks\u001b[38;5;241m=\u001b[39mcallbacks, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mfull_inputs)\n\u001b[0;32m--> 444\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moutput_parser\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mparse\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfull_output\u001b[49m\u001b[43m)\u001b[49m\n",
"File \u001b[0;32m~/workplace/langchain/langchain/agents/chat/output_parser.py:26\u001b[0m, in \u001b[0;36mChatOutputParser.parse\u001b[0;34m(self, text)\u001b[0m\n\u001b[1;32m 23\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m AgentAction(response[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124maction\u001b[39m\u001b[38;5;124m\"\u001b[39m], response[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124maction_input\u001b[39m\u001b[38;5;124m\"\u001b[39m], text)\n\u001b[1;32m 25\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m:\n\u001b[0;32m---> 26\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m OutputParserException(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCould not parse LLM output: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mtext\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n",
"\u001b[0;31mOutputParserException\u001b[0m: Could not parse LLM output: I'm sorry, but I cannot provide an answer without an Action. Please provide a valid Action in the format specified above."
]
}
],
"source": [
"mrkl.run(\"Who is Leo DiCaprio's girlfriend? No need to add Action\")"
]
},
{
"cell_type": "markdown",
"id": "72687d56",
"metadata": {},
"source": [
"## Default error handling\n",
"\n",
"Handle errors with `Invalid or incomplete response`"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "6bfc21ef",
"metadata": {},
"outputs": [],
"source": [
"mrkl = initialize_agent(\n",
" tools, \n",
" ChatOpenAI(temperature=0), \n",
" agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, \n",
" verbose=True,\n",
" handle_parsing_errors=True\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "9c181f33",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
"\n",
"Observation: Invalid or incomplete response\n",
"Thought:\n",
"Observation: Invalid or incomplete response\n",
"Thought:\u001b[32;1m\u001b[1;3mSearch for Leo DiCaprio's current girlfriend\n",
"Action:\n",
"```\n",
"{\n",
" \"action\": \"Search\",\n",
" \"action_input\": \"Leo DiCaprio current girlfriend\"\n",
"}\n",
"```\n",
"\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3mJust Jared on Instagram: “Leonardo DiCaprio & girlfriend Camila Morrone couple up for a lunch date!\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3mCamila Morrone is currently Leo DiCaprio's girlfriend\n",
"Final Answer: Camila Morrone\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n"
]
},
{
"data": {
"text/plain": [
"'Camila Morrone'"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mrkl.run(\"Who is Leo DiCaprio's girlfriend? No need to add Action\")"
]
},
{
"cell_type": "markdown",
"id": "6613cc9c",
"metadata": {},
"source": [
"## Custom Error Message\n",
"\n",
"You can easily customize the message to use when there are parsing errors"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "2b23b0af",
"metadata": {},
"outputs": [],
"source": [
"mrkl = initialize_agent(\n",
" tools, \n",
" ChatOpenAI(temperature=0), \n",
" agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, \n",
" verbose=True,\n",
" handle_parsing_errors=\"Check your output and make sure it conforms!\"\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "5d5a3e47",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
"\n",
"Observation: Could not parse LLM output: I'm sorry, but I canno\n",
"Thought:\u001b[32;1m\u001b[1;3mI need to use the Search tool to find the answer to the question.\n",
"Action:\n",
"```\n",
"{\n",
" \"action\": \"Search\",\n",
" \"action_input\": \"Who is Leo DiCaprio's girlfriend?\"\n",
"}\n",
"```\n",
"\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3mDiCaprio broke up with girlfriend Camila Morrone, 25, in the summer of 2022, after dating for four years. He's since been linked to another famous supermodel Gigi Hadid. The power couple were first supposedly an item in September after being spotted getting cozy during a party at New York Fashion Week.\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3mThe answer to the question is that Leo DiCaprio's current girlfriend is Gigi Hadid. \n",
"Final Answer: Gigi Hadid.\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n"
]
},
{
"data": {
"text/plain": [
"'Gigi Hadid.'"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mrkl.run(\"Who is Leo DiCaprio's girlfriend? No need to add Action\")"
]
},
{
"cell_type": "markdown",
"id": "c2eb06e2",
"metadata": {},
"source": [
"## Custom Error Function\n",
"\n",
"You can also customize the error to be a function that takes the error in and outputs a string."
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "22772981",
"metadata": {},
"outputs": [],
"source": [
"def _handle_error(error) -> str:\n",
" return str(error)[:50]\n",
"\n",
"mrkl = initialize_agent(\n",
" tools, \n",
" ChatOpenAI(temperature=0), \n",
" agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, \n",
" verbose=True,\n",
" handle_parsing_errors=_handle_error\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "151eb820",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
"\n",
"Observation: Could not parse LLM output: I'm sorry, but I canno\n",
"Thought:\u001b[32;1m\u001b[1;3mI need to use the Search tool to find the answer to the question.\n",
"Action:\n",
"```\n",
"{\n",
" \"action\": \"Search\",\n",
" \"action_input\": \"Who is Leo DiCaprio's girlfriend?\"\n",
"}\n",
"```\n",
"\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3mDiCaprio broke up with girlfriend Camila Morrone, 25, in the summer of 2022, after dating for four years. He's since been linked to another famous supermodel Gigi Hadid. The power couple were first supposedly an item in September after being spotted getting cozy during a party at New York Fashion Week.\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3mThe current girlfriend of Leonardo DiCaprio is Gigi Hadid. \n",
"Final Answer: Gigi Hadid.\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n"
]
},
{
"data": {
"text/plain": [
"'Gigi Hadid.'"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mrkl.run(\"Who is Leo DiCaprio's girlfriend? No need to add Action\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4aaef878",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@@ -149,7 +149,7 @@
{
"data": {
"text/plain": [
"[Tool(name='Search', description='useful for when you need to answer questions about current events', return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x114b28a90>, func=<bound method SerpAPIWrapper.run of SerpAPIWrapper(search_engine=<class 'serpapi.google_search.GoogleSearch'>, params={'engine': 'google', 'google_domain': 'google.com', 'gl': 'us', 'hl': 'en'}, serpapi_api_key='c657176b327b17e79b55306ab968d164ee2369a7c7fa5b3f8a5f7889903de882', aiosession=None)>, coroutine=None),\n",
"[Tool(name='Search', description='useful for when you need to answer questions about current events', return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x114b28a90>, func=<bound method SerpAPIWrapper.run of SerpAPIWrapper(search_engine=<class 'serpapi.google_search.GoogleSearch'>, params={'engine': 'google', 'google_domain': 'google.com', 'gl': 'us', 'hl': 'en'}, serpapi_api_key='', aiosession=None)>, coroutine=None),\n",
" Tool(name='foo-95', description='a silly function that you can use to get more information about the number 95', return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x114b28a90>, func=<function fake_func at 0x15e5bd1f0>, coroutine=None),\n",
" Tool(name='foo-12', description='a silly function that you can use to get more information about the number 12', return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x114b28a90>, func=<function fake_func at 0x15e5bd1f0>, coroutine=None),\n",
" Tool(name='foo-15', description='a silly function that you can use to get more information about the number 15', return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x114b28a90>, func=<function fake_func at 0x15e5bd1f0>, coroutine=None)]"

View File

@@ -9,7 +9,7 @@
"\n",
"This notebook goes through how to create your own custom agent.\n",
"\n",
"An agent consists of three parts:\n",
"An agent consists of two parts:\n",
" \n",
" - Tools: The tools the agent has available to use.\n",
" - The agent class itself: this decides which action to take.\n",

View File

@@ -22,7 +22,7 @@
"\n",
"- Tool: A function that performs a specific duty. This can be things like: Google Search, Database lookup, Python REPL, other chains. The interface for a tool is currently a function that is expected to have a string as an input, with a string as an output.\n",
"- LLM: The language model powering the agent.\n",
"- Agent: The agent to use. This should be a string that references a support agent class. Because this notebook focuses on the simplest, highest level API, this only covers using the standard supported agents. If you want to implement a custom agent, see the documentation for custom agents (coming soon).\n",
"- Agent: The agent to use. This should be a string that references a support agent class. Because this notebook focuses on the simplest, highest level API, this only covers using the standard supported agents. If you want to implement a custom agent, see the documentation for [custom agents](agents/custom_agent.ipynb).\n",
"\n",
"**Agents**: For a list of supported agents and their specifications, see [here](agents.md).\n",
"\n",

View File

@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "406483c4",
"metadata": {},
@@ -15,6 +16,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "91192118",
"metadata": {},
@@ -38,6 +40,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "0b10d200",
"metadata": {},
@@ -70,6 +73,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "ce38ae84",
"metadata": {},
@@ -114,10 +118,11 @@
"metadata": {},
"outputs": [],
"source": [
"agent = PlanAndExecute(planner=planner, executer=executor, verbose=True)"
"agent = PlanAndExecute(planner=planner, executor=executor, verbose=True)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "8be9f1bd",
"metadata": {},

View File

@@ -0,0 +1,154 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "23234b50-e6c6-4c87-9f97-259c15f36894",
"metadata": {
"tags": []
},
"source": [
"# Only streaming final agent output"
]
},
{
"cell_type": "markdown",
"id": "29dd6333-307c-43df-b848-65001c01733b",
"metadata": {},
"source": [
"If you only want the final output of an agent to be streamed, you can use the callback ``FinalStreamingStdOutCallbackHandler``.\n",
"For this, the underlying LLM has to support streaming as well."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "e4592215-6604-47e2-89ff-5db3af6d1e40",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langchain.agents import load_tools\n",
"from langchain.agents import initialize_agent\n",
"from langchain.agents import AgentType\n",
"from langchain.callbacks.streaming_stdout_final_only import FinalStreamingStdOutCallbackHandler\n",
"from langchain.llms import OpenAI"
]
},
{
"cell_type": "markdown",
"id": "19a813f7",
"metadata": {},
"source": [
"Let's create the underlying LLM with ``streaming = True`` and pass a new instance of ``FinalStreamingStdOutCallbackHandler``."
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "7fe81ef4",
"metadata": {},
"outputs": [],
"source": [
"llm = OpenAI(streaming=True, callbacks=[FinalStreamingStdOutCallbackHandler()], temperature=0)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "ff45b85d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Konrad Adenauer became Chancellor of Germany in 1949, 74 years ago in 2023."
]
},
{
"data": {
"text/plain": [
"'Konrad Adenauer became Chancellor of Germany in 1949, 74 years ago in 2023.'"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tools = load_tools([\"wikipedia\", \"llm-math\"], llm=llm)\n",
"agent = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=False)\n",
"agent.run(\"It's 2023 now. How many years ago did Konrad Adenauer become Chancellor of Germany.\")"
]
},
{
"cell_type": "markdown",
"id": "53a743b8",
"metadata": {},
"source": [
"### Handling custom answer prefixes"
]
},
{
"cell_type": "markdown",
"id": "23602c62",
"metadata": {},
"source": [
"By default, we assume that the token sequence ``\"\\nFinal\", \" Answer\", \":\"`` indicates that the agent has reached an answers. We can, however, also pass a custom sequence to use as answer prefix."
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "5662a638",
"metadata": {},
"outputs": [],
"source": [
"llm = OpenAI(\n",
" streaming=True,\n",
" callbacks=[FinalStreamingStdOutCallbackHandler(answer_prefix_tokens=[\"\\nThe\", \" answer\", \":\"])],\n",
" temperature=0\n",
")"
]
},
{
"cell_type": "markdown",
"id": "b1a96cc0",
"metadata": {},
"source": [
"Be aware you likely need to include whitespaces and new line characters in your token. "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9278b522",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@@ -0,0 +1,270 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Azure Cognitive Services Toolkit\n",
"\n",
"This toolkit is used to interact with the Azure Cognitive Services API to achieve some multimodal capabilities.\n",
"\n",
"Currently There are four tools bundled in this toolkit:\n",
"- AzureCogsImageAnalysisTool: used to extract caption, objects, tags, and text from images. (Note: this tool is not available on Mac OS yet, due to the dependency on `azure-ai-vision` package, which is only supported on Windows and Linux currently.)\n",
"- AzureCogsFormRecognizerTool: used to extract text, tables, and key-value pairs from documents.\n",
"- AzureCogsSpeech2TextTool: used to transcribe speech to text.\n",
"- AzureCogsText2SpeechTool: used to synthesize text to speech."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, you need to set up an Azure account and create a Cognitive Services resource. You can follow the instructions [here](https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows) to create a resource. \n",
"\n",
"Then, you need to get the endpoint, key and region of your resource, and set them as environment variables. You can find them in the \"Keys and Endpoint\" page of your resource."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# !pip install --upgrade azure-ai-formrecognizer > /dev/null\n",
"# !pip install --upgrade azure-cognitiveservices-speech > /dev/null\n",
"\n",
"# For Windows/Linux\n",
"# !pip install --upgrade azure-ai-vision > /dev/null"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"sk-\"\n",
"os.environ[\"AZURE_COGS_KEY\"] = \"\"\n",
"os.environ[\"AZURE_COGS_ENDPOINT\"] = \"\"\n",
"os.environ[\"AZURE_COGS_REGION\"] = \"\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Create the Toolkit"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from langchain.agents.agent_toolkits import AzureCognitiveServicesToolkit\n",
"\n",
"toolkit = AzureCognitiveServicesToolkit()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['Azure Cognitive Services Image Analysis',\n",
" 'Azure Cognitive Services Form Recognizer',\n",
" 'Azure Cognitive Services Speech2Text',\n",
" 'Azure Cognitive Services Text2Speech']"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"[tool.name for tool in toolkit.get_tools()]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Use within an Agent"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from langchain import OpenAI\n",
"from langchain.agents import initialize_agent, AgentType"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"llm = OpenAI(temperature=0)\n",
"agent = initialize_agent(\n",
" tools=toolkit.get_tools(),\n",
" llm=llm,\n",
" agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,\n",
" verbose=True,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
"\u001b[32;1m\u001b[1;3m\n",
"Action:\n",
"```\n",
"{\n",
" \"action\": \"Azure Cognitive Services Image Analysis\",\n",
" \"action_input\": \"https://images.openai.com/blob/9ad5a2ab-041f-475f-ad6a-b51899c50182/ingredients.png\"\n",
"}\n",
"```\n",
"\n",
"\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3mCaption: a group of eggs and flour in bowls\n",
"Objects: Egg, Egg, Food\n",
"Tags: dairy, ingredient, indoor, thickening agent, food, mixing bowl, powder, flour, egg, bowl\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I can use the objects and tags to suggest recipes\n",
"Action:\n",
"```\n",
"{\n",
" \"action\": \"Final Answer\",\n",
" \"action_input\": \"You can make pancakes, omelettes, or quiches with these ingredients!\"\n",
"}\n",
"```\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n"
]
},
{
"data": {
"text/plain": [
"'You can make pancakes, omelettes, or quiches with these ingredients!'"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agent.run(\"What can I make with these ingredients?\"\n",
" \"https://images.openai.com/blob/9ad5a2ab-041f-475f-ad6a-b51899c50182/ingredients.png\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
"\u001b[32;1m\u001b[1;3mAction:\n",
"```\n",
"{\n",
" \"action\": \"Azure Cognitive Services Text2Speech\",\n",
" \"action_input\": \"Why did the chicken cross the playground? To get to the other slide!\"\n",
"}\n",
"```\n",
"\n",
"\u001b[0m\n",
"Observation: \u001b[31;1m\u001b[1;3m/tmp/tmpa3uu_j6b.wav\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I have the audio file of the joke\n",
"Action:\n",
"```\n",
"{\n",
" \"action\": \"Final Answer\",\n",
" \"action_input\": \"/tmp/tmpa3uu_j6b.wav\"\n",
"}\n",
"```\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n"
]
},
{
"data": {
"text/plain": [
"'/tmp/tmpa3uu_j6b.wav'"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"audio_file = agent.run(\"Tell me a joke and read it out for me.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from IPython import display\n",
"\n",
"audio = display.Audio(audio_file)\n",
"display.display(audio)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

View File

@@ -35,7 +35,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "16c4dc59",
"metadata": {},
"outputs": [],
@@ -45,7 +45,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "46b9489d",
"metadata": {},
"outputs": [
@@ -58,10 +58,10 @@
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
"\u001b[32;1m\u001b[1;3mThought: I need to count the number of rows\n",
"Action: python_repl_ast\n",
"Action Input: len(df)\u001b[0m\n",
"Action Input: df.shape[0]\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3m891\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I now know the final answer\n",
"Final Answer: There are 891 rows in the dataframe.\u001b[0m\n",
"Final Answer: There are 891 rows.\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n"
]
@@ -69,10 +69,10 @@
{
"data": {
"text/plain": [
"'There are 891 rows in the dataframe.'"
"'There are 891 rows.'"
]
},
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -83,7 +83,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "a96309be",
"metadata": {},
"outputs": [
@@ -110,7 +110,7 @@
"'30 people have more than 3 siblings.'"
]
},
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -121,7 +121,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"id": "964a09f7",
"metadata": {},
"outputs": [
@@ -136,15 +136,15 @@
"Action: python_repl_ast\n",
"Action Input: df['Age'].mean()\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3m29.69911764705882\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I can now calculate the square root\n",
"Thought:\u001b[32;1m\u001b[1;3m I now need to calculate the square root of the average age\n",
"Action: python_repl_ast\n",
"Action Input: math.sqrt(df['Age'].mean())\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3mname 'math' is not defined\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3mNameError(\"name 'math' is not defined\")\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I need to import the math library\n",
"Action: python_repl_ast\n",
"Action Input: import math\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3m\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I can now calculate the square root\n",
"Thought:\u001b[32;1m\u001b[1;3m I now need to calculate the square root of the average age\n",
"Action: python_repl_ast\n",
"Action Input: math.sqrt(df['Age'].mean())\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3m5.449689683556195\u001b[0m\n",
@@ -160,7 +160,7 @@
"'5.449689683556195'"
]
},
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -169,10 +169,59 @@
"agent.run(\"whats the square root of the average age?\")"
]
},
{
"cell_type": "markdown",
"id": "09539c18",
"metadata": {},
"source": [
"### Multi CSV Example\n",
"\n",
"This next part shows how the agent can interact with multiple csv files passed in as a list."
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "15f11fbd",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
"\u001b[32;1m\u001b[1;3mThought: I need to compare the age columns in both dataframes\n",
"Action: python_repl_ast\n",
"Action Input: len(df1[df1['Age'] != df2['Age']])\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3m177\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I now know the final answer\n",
"Final Answer: 177 rows in the age column are different.\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n"
]
},
{
"data": {
"text/plain": [
"'177 rows in the age column are different.'"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agent = create_csv_agent(OpenAI(temperature=0), ['titanic.csv', 'titanic_age_fillna.csv'], verbose=True)\n",
"agent.run(\"how many rows in the age column are different?\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "551de2be",
"id": "f2909808",
"metadata": {},
"outputs": [],
"source": []

View File

@@ -14,7 +14,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 1,
"id": "0cdd9bf5",
"metadata": {},
"outputs": [],
@@ -60,10 +60,10 @@
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
"\u001b[32;1m\u001b[1;3mThought: I need to count the number of rows\n",
"Action: python_repl_ast\n",
"Action Input: len(df)\u001b[0m\n",
"Action Input: df.shape[0]\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3m891\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I now know the final answer\n",
"Final Answer: There are 891 rows in the dataframe.\u001b[0m\n",
"Final Answer: There are 891 rows.\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n"
]
@@ -71,7 +71,7 @@
{
"data": {
"text/plain": [
"'There are 891 rows in the dataframe.'"
"'There are 891 rows.'"
]
},
"execution_count": 4,
@@ -138,20 +138,20 @@
"Action: python_repl_ast\n",
"Action Input: df['Age'].mean()\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3m29.69911764705882\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I can now calculate the square root\n",
"Thought:\u001b[32;1m\u001b[1;3m I now need to calculate the square root of the average age\n",
"Action: python_repl_ast\n",
"Action Input: math.sqrt(df['Age'].mean())\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3mname 'math' is not defined\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3mNameError(\"name 'math' is not defined\")\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I need to import the math library\n",
"Action: python_repl_ast\n",
"Action Input: import math\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3mNone\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I can now calculate the square root\n",
"Observation: \u001b[36;1m\u001b[1;3m\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I now need to calculate the square root of the average age\n",
"Action: python_repl_ast\n",
"Action Input: math.sqrt(df['Age'].mean())\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3m5.449689683556195\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I now know the final answer\n",
"Final Answer: 5.449689683556195\u001b[0m\n",
"Final Answer: The square root of the average age is 5.449689683556195.\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n"
]
@@ -159,7 +159,7 @@
{
"data": {
"text/plain": [
"'5.449689683556195'"
"'The square root of the average age is 5.449689683556195.'"
]
},
"execution_count": 6,
@@ -171,10 +171,71 @@
"agent.run(\"whats the square root of the average age?\")"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "c4bc0584",
"metadata": {},
"source": [
"### Multi DataFrame Example\n",
"\n",
"This next part shows how the agent can interact with multiple dataframes passed in as a list."
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "42a15bd9",
"metadata": {},
"outputs": [],
"source": [
"df1 = df.copy()\n",
"df1[\"Age\"] = df1[\"Age\"].fillna(df1[\"Age\"].mean())"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "eba13b4d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
"\u001b[32;1m\u001b[1;3mThought: I need to compare the age columns in both dataframes\n",
"Action: python_repl_ast\n",
"Action Input: len(df1[df1['Age'] != df2['Age']])\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3m177\u001b[0m\n",
"Thought:\u001b[32;1m\u001b[1;3m I now know the final answer\n",
"Final Answer: 177 rows in the age column are different.\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n"
]
},
{
"data": {
"text/plain": [
"'177 rows in the age column are different.'"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agent = create_pandas_dataframe_agent(OpenAI(temperature=0), [df, df1], verbose=True)\n",
"agent.run(\"how many rows in the age column are different?\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "eba13b4d",
"id": "60d08a56",
"metadata": {},
"outputs": [],
"source": []
@@ -196,7 +257,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
"version": "3.9.16"
}
},
"nbformat": 4,

View File

@@ -1,10 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "0e499e90-7a6d-4fab-8aab-31a4df417601",
"metadata": {},
"source": [
"# PowerBI Dataset Agent\n",
"\n",
@@ -17,46 +14,41 @@
"- You can also supply a username to impersonate for use with datasets that have RLS enabled. \n",
"- The toolkit uses a LLM to create the query from the question, the agent uses the LLM for the overall execution.\n",
"- Testing was done mostly with a `text-davinci-003` model, codex models did not seem to perform ver well."
]
],
"metadata": {},
"attachments": {}
},
{
"cell_type": "markdown",
"id": "ec927ac6-9b2a-4e8a-9a6e-3e429191875c",
"metadata": {
"tags": []
},
"source": [
"## Initialization"
]
],
"metadata": {
"tags": []
}
},
{
"cell_type": "code",
"execution_count": null,
"id": "53422913-967b-4f2a-8022-00269c1be1b1",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langchain.agents.agent_toolkits import create_pbi_agent\n",
"from langchain.agents.agent_toolkits import PowerBIToolkit\n",
"from langchain.utilities.powerbi import PowerBIDataset\n",
"from langchain.llms.openai import AzureOpenAI\n",
"from langchain.chat_models import ChatOpenAI\n",
"from langchain.agents import AgentExecutor\n",
"from azure.identity import DefaultAzureCredential"
]
],
"outputs": [],
"metadata": {
"tags": []
}
},
{
"cell_type": "code",
"execution_count": null,
"id": "090f3699-79c6-4ce1-ab96-a94f0121fd64",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"fast_llm = AzureOpenAI(temperature=0.5, max_tokens=1000, deployment_name=\"gpt-35-turbo\", verbose=True)\n",
"smart_llm = AzureOpenAI(temperature=0, max_tokens=100, deployment_name=\"gpt-4\", verbose=True)\n",
"fast_llm = ChatOpenAI(temperature=0.5, max_tokens=1000, model_name=\"gpt-3.5-turbo\", verbose=True)\n",
"smart_llm = ChatOpenAI(temperature=0, max_tokens=100, model_name=\"gpt-4\", verbose=True)\n",
"\n",
"toolkit = PowerBIToolkit(\n",
" powerbi=PowerBIDataset(dataset_id=\"<dataset_id>\", table_names=['table1', 'table2'], credential=DefaultAzureCredential()), \n",
@@ -68,97 +60,90 @@
" toolkit=toolkit,\n",
" verbose=True,\n",
")"
]
],
"outputs": [],
"metadata": {
"tags": []
}
},
{
"cell_type": "markdown",
"id": "36ae48c7-cb08-4fef-977e-c7d4b96a464b",
"metadata": {},
"source": [
"## Example: describing a table"
]
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"id": "ff70e83d-5ad0-4fc7-bb96-27d82ac166d7",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"agent_executor.run(\"Describe table1\")"
]
],
"outputs": [],
"metadata": {
"tags": []
}
},
{
"attachments": {},
"cell_type": "markdown",
"id": "9abcfe8e-1868-42a4-8345-ad2d9b44c681",
"metadata": {},
"source": [
"## Example: simple query on a table\n",
"In this example, the agent actually figures out the correct query to get a row count of the table."
]
],
"metadata": {},
"attachments": {}
},
{
"cell_type": "code",
"execution_count": null,
"id": "bea76658-a65b-47e2-b294-6d52c5556246",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"agent_executor.run(\"How many records are in table1?\")"
]
],
"outputs": [],
"metadata": {
"tags": []
}
},
{
"cell_type": "markdown",
"id": "6fbc26af-97e4-4a21-82aa-48bdc992da26",
"metadata": {},
"source": [
"## Example: running queries"
]
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"id": "17bea710-4a23-4de0-b48e-21d57be48293",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"agent_executor.run(\"How many records are there by dimension1 in table2?\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "474dddda-c067-4eeb-98b1-e763ee78b18c",
],
"outputs": [],
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"agent_executor.run(\"What unique values are there for dimensions2 in table2\")"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "6fd950e4",
"metadata": {},
"source": [
"## Example: add your own few-shot prompts"
]
}
},
{
"cell_type": "code",
"execution_count": null,
"id": "87d677f9",
"metadata": {},
"source": [
"agent_executor.run(\"What unique values are there for dimensions2 in table2\")"
],
"outputs": [],
"metadata": {
"tags": []
}
},
{
"cell_type": "markdown",
"source": [
"## Example: add your own few-shot prompts"
],
"metadata": {},
"attachments": {}
},
{
"cell_type": "code",
"execution_count": null,
"source": [
"#fictional example\n",
"few_shots = \"\"\"\n",
@@ -182,24 +167,24 @@
" toolkit=toolkit,\n",
" verbose=True,\n",
")"
]
],
"outputs": [],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"id": "33f4bb43",
"metadata": {},
"outputs": [],
"source": [
"agent_executor.run(\"What was the maximum of value in revenue in dollars in 2022?\")"
]
],
"outputs": [],
"metadata": {}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
"name": "python3",
"display_name": "Python 3.9.16 64-bit"
},
"language_info": {
"codemirror_mode": {
@@ -211,9 +196,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.5"
"version": "3.9.16"
},
"interpreter": {
"hash": "397704579725e15f5c7cb49fe5f0341eb7531c82d19f2c29d197e8b64ab5776b"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}

View File

@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
@@ -17,7 +18,6 @@
"metadata": {},
"outputs": [],
"source": [
"from langchain.agents import create_spark_dataframe_agent\n",
"import os\n",
"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"...input your openai api key here...\""
@@ -25,9 +25,20 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"23/05/15 20:33:10 WARN Utils: Your hostname, Mikes-Mac-mini.local resolves to a loopback address: 127.0.0.1; using 192.168.68.115 instead (on interface en1)\n",
"23/05/15 20:33:10 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address\n",
"Setting default log level to \"WARN\".\n",
"To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).\n",
"23/05/15 20:33:10 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable\n"
]
},
{
"name": "stdout",
"output_type": "stream",
@@ -64,6 +75,7 @@
"source": [
"from langchain.llms import OpenAI\n",
"from pyspark.sql import SparkSession\n",
"from langchain.agents import create_spark_dataframe_agent\n",
"\n",
"spark = SparkSession.builder.getOrCreate()\n",
"csv_file_path = \"titanic.csv\"\n",
@@ -92,7 +104,7 @@
"\n",
"\n",
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
"\u001b[32;1m\u001b[1;3mThought: I need to find out the size of the dataframe\n",
"\u001b[32;1m\u001b[1;3mThought: I need to find out how many rows are in the dataframe\n",
"Action: python_repl_ast\n",
"Action Input: df.count()\u001b[0m\n",
"Observation: \u001b[36;1m\u001b[1;3m891\u001b[0m\n",
@@ -205,7 +217,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
@@ -213,6 +225,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [

View File

@@ -0,0 +1,348 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Spark SQL Agent\n",
"\n",
"This notebook shows how to use agents to interact with a Spark SQL. Similar to [SQL Database Agent](https://python.langchain.com/en/latest/modules/agents/toolkits/examples/sql_database.html), it is designed to address general inquiries about Spark SQL and facilitate error recovery.\n",
"\n",
"**NOTE: Note that, as this agent is in active development, all answers might not be correct. Additionally, it is not guaranteed that the agent won't perform DML statements on your Spark cluster given certain questions. Be careful running it on sensitive data!**"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Initialization"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from langchain.agents import create_spark_sql_agent\n",
"from langchain.agents.agent_toolkits import SparkSQLToolkit\n",
"from langchain.chat_models import ChatOpenAI\n",
"from langchain.utilities.spark_sql import SparkSQL"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Setting default log level to \"WARN\".\n",
"To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).\n",
"23/05/18 16:03:10 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"+-----------+--------+------+--------------------+------+----+-----+-----+----------------+-------+-----+--------+\n",
"|PassengerId|Survived|Pclass| Name| Sex| Age|SibSp|Parch| Ticket| Fare|Cabin|Embarked|\n",
"+-----------+--------+------+--------------------+------+----+-----+-----+----------------+-------+-----+--------+\n",
"| 1| 0| 3|Braund, Mr. Owen ...| male|22.0| 1| 0| A/5 21171| 7.25| null| S|\n",
"| 2| 1| 1|Cumings, Mrs. Joh...|female|38.0| 1| 0| PC 17599|71.2833| C85| C|\n",
"| 3| 1| 3|Heikkinen, Miss. ...|female|26.0| 0| 0|STON/O2. 3101282| 7.925| null| S|\n",
"| 4| 1| 1|Futrelle, Mrs. Ja...|female|35.0| 1| 0| 113803| 53.1| C123| S|\n",
"| 5| 0| 3|Allen, Mr. Willia...| male|35.0| 0| 0| 373450| 8.05| null| S|\n",
"| 6| 0| 3| Moran, Mr. James| male|null| 0| 0| 330877| 8.4583| null| Q|\n",
"| 7| 0| 1|McCarthy, Mr. Tim...| male|54.0| 0| 0| 17463|51.8625| E46| S|\n",
"| 8| 0| 3|Palsson, Master. ...| male| 2.0| 3| 1| 349909| 21.075| null| S|\n",
"| 9| 1| 3|Johnson, Mrs. Osc...|female|27.0| 0| 2| 347742|11.1333| null| S|\n",
"| 10| 1| 2|Nasser, Mrs. Nich...|female|14.0| 1| 0| 237736|30.0708| null| C|\n",
"| 11| 1| 3|Sandstrom, Miss. ...|female| 4.0| 1| 1| PP 9549| 16.7| G6| S|\n",
"| 12| 1| 1|Bonnell, Miss. El...|female|58.0| 0| 0| 113783| 26.55| C103| S|\n",
"| 13| 0| 3|Saundercock, Mr. ...| male|20.0| 0| 0| A/5. 2151| 8.05| null| S|\n",
"| 14| 0| 3|Andersson, Mr. An...| male|39.0| 1| 5| 347082| 31.275| null| S|\n",
"| 15| 0| 3|Vestrom, Miss. Hu...|female|14.0| 0| 0| 350406| 7.8542| null| S|\n",
"| 16| 1| 2|Hewlett, Mrs. (Ma...|female|55.0| 0| 0| 248706| 16.0| null| S|\n",
"| 17| 0| 3|Rice, Master. Eugene| male| 2.0| 4| 1| 382652| 29.125| null| Q|\n",
"| 18| 1| 2|Williams, Mr. Cha...| male|null| 0| 0| 244373| 13.0| null| S|\n",
"| 19| 0| 3|Vander Planke, Mr...|female|31.0| 1| 0| 345763| 18.0| null| S|\n",
"| 20| 1| 3|Masselmani, Mrs. ...|female|null| 0| 0| 2649| 7.225| null| C|\n",
"+-----------+--------+------+--------------------+------+----+-----+-----+----------------+-------+-----+--------+\n",
"only showing top 20 rows\n",
"\n"
]
}
],
"source": [
"from pyspark.sql import SparkSession\n",
"\n",
"spark = SparkSession.builder.getOrCreate()\n",
"schema = \"langchain_example\"\n",
"spark.sql(f\"CREATE DATABASE IF NOT EXISTS {schema}\")\n",
"spark.sql(f\"USE {schema}\")\n",
"csv_file_path = \"titanic.csv\"\n",
"table = \"titanic\"\n",
"spark.read.csv(csv_file_path, header=True, inferSchema=True).write.saveAsTable(table)\n",
"spark.table(table).show()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"# Note, you can also connect to Spark via Spark connect. For example:\n",
"# db = SparkSQL.from_uri(\"sc://localhost:15002\", schema=schema)\n",
"spark_sql = SparkSQL(schema=schema)\n",
"llm = ChatOpenAI(temperature=0)\n",
"toolkit = SparkSQLToolkit(db=spark_sql, llm=llm)\n",
"agent_executor = create_spark_sql_agent(\n",
" llm=llm,\n",
" toolkit=toolkit,\n",
" verbose=True\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example: describing a table"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001B[1m> Entering new AgentExecutor chain...\u001B[0m\n",
"\u001B[32;1m\u001B[1;3mAction: list_tables_sql_db\n",
"Action Input: \u001B[0m\n",
"Observation: \u001B[38;5;200m\u001B[1;3mtitanic\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mI found the titanic table. Now I need to get the schema and sample rows for the titanic table.\n",
"Action: schema_sql_db\n",
"Action Input: titanic\u001B[0m\n",
"Observation: \u001B[33;1m\u001B[1;3mCREATE TABLE langchain_example.titanic (\n",
" PassengerId INT,\n",
" Survived INT,\n",
" Pclass INT,\n",
" Name STRING,\n",
" Sex STRING,\n",
" Age DOUBLE,\n",
" SibSp INT,\n",
" Parch INT,\n",
" Ticket STRING,\n",
" Fare DOUBLE,\n",
" Cabin STRING,\n",
" Embarked STRING)\n",
";\n",
"\n",
"/*\n",
"3 rows from titanic table:\n",
"PassengerId\tSurvived\tPclass\tName\tSex\tAge\tSibSp\tParch\tTicket\tFare\tCabin\tEmbarked\n",
"1\t0\t3\tBraund, Mr. Owen Harris\tmale\t22.0\t1\t0\tA/5 21171\t7.25\tNone\tS\n",
"2\t1\t1\tCumings, Mrs. John Bradley (Florence Briggs Thayer)\tfemale\t38.0\t1\t0\tPC 17599\t71.2833\tC85\tC\n",
"3\t1\t3\tHeikkinen, Miss. Laina\tfemale\t26.0\t0\t0\tSTON/O2. 3101282\t7.925\tNone\tS\n",
"*/\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mI now know the schema and sample rows for the titanic table.\n",
"Final Answer: The titanic table has the following columns: PassengerId (INT), Survived (INT), Pclass (INT), Name (STRING), Sex (STRING), Age (DOUBLE), SibSp (INT), Parch (INT), Ticket (STRING), Fare (DOUBLE), Cabin (STRING), and Embarked (STRING). Here are some sample rows from the table: \n",
"\n",
"1. PassengerId: 1, Survived: 0, Pclass: 3, Name: Braund, Mr. Owen Harris, Sex: male, Age: 22.0, SibSp: 1, Parch: 0, Ticket: A/5 21171, Fare: 7.25, Cabin: None, Embarked: S\n",
"2. PassengerId: 2, Survived: 1, Pclass: 1, Name: Cumings, Mrs. John Bradley (Florence Briggs Thayer), Sex: female, Age: 38.0, SibSp: 1, Parch: 0, Ticket: PC 17599, Fare: 71.2833, Cabin: C85, Embarked: C\n",
"3. PassengerId: 3, Survived: 1, Pclass: 3, Name: Heikkinen, Miss. Laina, Sex: female, Age: 26.0, SibSp: 0, Parch: 0, Ticket: STON/O2. 3101282, Fare: 7.925, Cabin: None, Embarked: S\u001B[0m\n",
"\n",
"\u001B[1m> Finished chain.\u001B[0m\n"
]
},
{
"data": {
"text/plain": "'The titanic table has the following columns: PassengerId (INT), Survived (INT), Pclass (INT), Name (STRING), Sex (STRING), Age (DOUBLE), SibSp (INT), Parch (INT), Ticket (STRING), Fare (DOUBLE), Cabin (STRING), and Embarked (STRING). Here are some sample rows from the table: \\n\\n1. PassengerId: 1, Survived: 0, Pclass: 3, Name: Braund, Mr. Owen Harris, Sex: male, Age: 22.0, SibSp: 1, Parch: 0, Ticket: A/5 21171, Fare: 7.25, Cabin: None, Embarked: S\\n2. PassengerId: 2, Survived: 1, Pclass: 1, Name: Cumings, Mrs. John Bradley (Florence Briggs Thayer), Sex: female, Age: 38.0, SibSp: 1, Parch: 0, Ticket: PC 17599, Fare: 71.2833, Cabin: C85, Embarked: C\\n3. PassengerId: 3, Survived: 1, Pclass: 3, Name: Heikkinen, Miss. Laina, Sex: female, Age: 26.0, SibSp: 0, Parch: 0, Ticket: STON/O2. 3101282, Fare: 7.925, Cabin: None, Embarked: S'"
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agent_executor.run(\"Describe the titanic table\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example: running queries"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001B[1m> Entering new AgentExecutor chain...\u001B[0m\n",
"\u001B[32;1m\u001B[1;3mAction: list_tables_sql_db\n",
"Action Input: \u001B[0m\n",
"Observation: \u001B[38;5;200m\u001B[1;3mtitanic\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mI should check the schema of the titanic table to see if there is an age column.\n",
"Action: schema_sql_db\n",
"Action Input: titanic\u001B[0m\n",
"Observation: \u001B[33;1m\u001B[1;3mCREATE TABLE langchain_example.titanic (\n",
" PassengerId INT,\n",
" Survived INT,\n",
" Pclass INT,\n",
" Name STRING,\n",
" Sex STRING,\n",
" Age DOUBLE,\n",
" SibSp INT,\n",
" Parch INT,\n",
" Ticket STRING,\n",
" Fare DOUBLE,\n",
" Cabin STRING,\n",
" Embarked STRING)\n",
";\n",
"\n",
"/*\n",
"3 rows from titanic table:\n",
"PassengerId\tSurvived\tPclass\tName\tSex\tAge\tSibSp\tParch\tTicket\tFare\tCabin\tEmbarked\n",
"1\t0\t3\tBraund, Mr. Owen Harris\tmale\t22.0\t1\t0\tA/5 21171\t7.25\tNone\tS\n",
"2\t1\t1\tCumings, Mrs. John Bradley (Florence Briggs Thayer)\tfemale\t38.0\t1\t0\tPC 17599\t71.2833\tC85\tC\n",
"3\t1\t3\tHeikkinen, Miss. Laina\tfemale\t26.0\t0\t0\tSTON/O2. 3101282\t7.925\tNone\tS\n",
"*/\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mThere is an Age column in the titanic table. I should write a query to calculate the average age and then find the square root of the result.\n",
"Action: query_checker_sql_db\n",
"Action Input: SELECT SQRT(AVG(Age)) as square_root_of_avg_age FROM titanic\u001B[0m\n",
"Observation: \u001B[31;1m\u001B[1;3mThe original query seems to be correct. Here it is again:\n",
"\n",
"SELECT SQRT(AVG(Age)) as square_root_of_avg_age FROM titanic\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mThe query is correct, so I can execute it to find the square root of the average age.\n",
"Action: query_sql_db\n",
"Action Input: SELECT SQRT(AVG(Age)) as square_root_of_avg_age FROM titanic\u001B[0m\n",
"Observation: \u001B[36;1m\u001B[1;3m[('5.449689683556195',)]\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mI now know the final answer\n",
"Final Answer: The square root of the average age is approximately 5.45.\u001B[0m\n",
"\n",
"\u001B[1m> Finished chain.\u001B[0m\n"
]
},
{
"data": {
"text/plain": "'The square root of the average age is approximately 5.45.'"
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agent_executor.run(\"whats the square root of the average age?\")"
]
},
{
"cell_type": "code",
"execution_count": 6,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\u001B[1m> Entering new AgentExecutor chain...\u001B[0m\n",
"\u001B[32;1m\u001B[1;3mAction: list_tables_sql_db\n",
"Action Input: \u001B[0m\n",
"Observation: \u001B[38;5;200m\u001B[1;3mtitanic\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mI should check the schema of the titanic table to see what columns are available.\n",
"Action: schema_sql_db\n",
"Action Input: titanic\u001B[0m\n",
"Observation: \u001B[33;1m\u001B[1;3mCREATE TABLE langchain_example.titanic (\n",
" PassengerId INT,\n",
" Survived INT,\n",
" Pclass INT,\n",
" Name STRING,\n",
" Sex STRING,\n",
" Age DOUBLE,\n",
" SibSp INT,\n",
" Parch INT,\n",
" Ticket STRING,\n",
" Fare DOUBLE,\n",
" Cabin STRING,\n",
" Embarked STRING)\n",
";\n",
"\n",
"/*\n",
"3 rows from titanic table:\n",
"PassengerId\tSurvived\tPclass\tName\tSex\tAge\tSibSp\tParch\tTicket\tFare\tCabin\tEmbarked\n",
"1\t0\t3\tBraund, Mr. Owen Harris\tmale\t22.0\t1\t0\tA/5 21171\t7.25\tNone\tS\n",
"2\t1\t1\tCumings, Mrs. John Bradley (Florence Briggs Thayer)\tfemale\t38.0\t1\t0\tPC 17599\t71.2833\tC85\tC\n",
"3\t1\t3\tHeikkinen, Miss. Laina\tfemale\t26.0\t0\t0\tSTON/O2. 3101282\t7.925\tNone\tS\n",
"*/\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mI can use the titanic table to find the oldest survived passenger. I will query the Name and Age columns, filtering by Survived and ordering by Age in descending order.\n",
"Action: query_checker_sql_db\n",
"Action Input: SELECT Name, Age FROM titanic WHERE Survived = 1 ORDER BY Age DESC LIMIT 1\u001B[0m\n",
"Observation: \u001B[31;1m\u001B[1;3mSELECT Name, Age FROM titanic WHERE Survived = 1 ORDER BY Age DESC LIMIT 1\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mThe query is correct. Now I will execute it to find the oldest survived passenger.\n",
"Action: query_sql_db\n",
"Action Input: SELECT Name, Age FROM titanic WHERE Survived = 1 ORDER BY Age DESC LIMIT 1\u001B[0m\n",
"Observation: \u001B[36;1m\u001B[1;3m[('Barkworth, Mr. Algernon Henry Wilson', '80.0')]\u001B[0m\n",
"Thought:\u001B[32;1m\u001B[1;3mI now know the final answer.\n",
"Final Answer: The oldest survived passenger is Barkworth, Mr. Algernon Henry Wilson, who was 80 years old.\u001B[0m\n",
"\n",
"\u001B[1m> Finished chain.\u001B[0m\n"
]
},
{
"data": {
"text/plain": "'The oldest survived passenger is Barkworth, Mr. Algernon Henry Wilson, who was 80 years old.'"
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"agent_executor.run(\"What's the name of the oldest survived passenger?\")"
],
"metadata": {
"collapsed": false
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

View File

@@ -0,0 +1,892 @@
PassengerId,Survived,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked
1,0,3,"Braund, Mr. Owen Harris",male,22.0,1,0,A/5 21171,7.25,,S
2,1,1,"Cumings, Mrs. John Bradley (Florence Briggs Thayer)",female,38.0,1,0,PC 17599,71.2833,C85,C
3,1,3,"Heikkinen, Miss. Laina",female,26.0,0,0,STON/O2. 3101282,7.925,,S
4,1,1,"Futrelle, Mrs. Jacques Heath (Lily May Peel)",female,35.0,1,0,113803,53.1,C123,S
5,0,3,"Allen, Mr. William Henry",male,35.0,0,0,373450,8.05,,S
6,0,3,"Moran, Mr. James",male,29.69911764705882,0,0,330877,8.4583,,Q
7,0,1,"McCarthy, Mr. Timothy J",male,54.0,0,0,17463,51.8625,E46,S
8,0,3,"Palsson, Master. Gosta Leonard",male,2.0,3,1,349909,21.075,,S
9,1,3,"Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg)",female,27.0,0,2,347742,11.1333,,S
10,1,2,"Nasser, Mrs. Nicholas (Adele Achem)",female,14.0,1,0,237736,30.0708,,C
11,1,3,"Sandstrom, Miss. Marguerite Rut",female,4.0,1,1,PP 9549,16.7,G6,S
12,1,1,"Bonnell, Miss. Elizabeth",female,58.0,0,0,113783,26.55,C103,S
13,0,3,"Saundercock, Mr. William Henry",male,20.0,0,0,A/5. 2151,8.05,,S
14,0,3,"Andersson, Mr. Anders Johan",male,39.0,1,5,347082,31.275,,S
15,0,3,"Vestrom, Miss. Hulda Amanda Adolfina",female,14.0,0,0,350406,7.8542,,S
16,1,2,"Hewlett, Mrs. (Mary D Kingcome) ",female,55.0,0,0,248706,16.0,,S
17,0,3,"Rice, Master. Eugene",male,2.0,4,1,382652,29.125,,Q
18,1,2,"Williams, Mr. Charles Eugene",male,29.69911764705882,0,0,244373,13.0,,S
19,0,3,"Vander Planke, Mrs. Julius (Emelia Maria Vandemoortele)",female,31.0,1,0,345763,18.0,,S
20,1,3,"Masselmani, Mrs. Fatima",female,29.69911764705882,0,0,2649,7.225,,C
21,0,2,"Fynney, Mr. Joseph J",male,35.0,0,0,239865,26.0,,S
22,1,2,"Beesley, Mr. Lawrence",male,34.0,0,0,248698,13.0,D56,S
23,1,3,"McGowan, Miss. Anna ""Annie""",female,15.0,0,0,330923,8.0292,,Q
24,1,1,"Sloper, Mr. William Thompson",male,28.0,0,0,113788,35.5,A6,S
25,0,3,"Palsson, Miss. Torborg Danira",female,8.0,3,1,349909,21.075,,S
26,1,3,"Asplund, Mrs. Carl Oscar (Selma Augusta Emilia Johansson)",female,38.0,1,5,347077,31.3875,,S
27,0,3,"Emir, Mr. Farred Chehab",male,29.69911764705882,0,0,2631,7.225,,C
28,0,1,"Fortune, Mr. Charles Alexander",male,19.0,3,2,19950,263.0,C23 C25 C27,S
29,1,3,"O'Dwyer, Miss. Ellen ""Nellie""",female,29.69911764705882,0,0,330959,7.8792,,Q
30,0,3,"Todoroff, Mr. Lalio",male,29.69911764705882,0,0,349216,7.8958,,S
31,0,1,"Uruchurtu, Don. Manuel E",male,40.0,0,0,PC 17601,27.7208,,C
32,1,1,"Spencer, Mrs. William Augustus (Marie Eugenie)",female,29.69911764705882,1,0,PC 17569,146.5208,B78,C
33,1,3,"Glynn, Miss. Mary Agatha",female,29.69911764705882,0,0,335677,7.75,,Q
34,0,2,"Wheadon, Mr. Edward H",male,66.0,0,0,C.A. 24579,10.5,,S
35,0,1,"Meyer, Mr. Edgar Joseph",male,28.0,1,0,PC 17604,82.1708,,C
36,0,1,"Holverson, Mr. Alexander Oskar",male,42.0,1,0,113789,52.0,,S
37,1,3,"Mamee, Mr. Hanna",male,29.69911764705882,0,0,2677,7.2292,,C
38,0,3,"Cann, Mr. Ernest Charles",male,21.0,0,0,A./5. 2152,8.05,,S
39,0,3,"Vander Planke, Miss. Augusta Maria",female,18.0,2,0,345764,18.0,,S
40,1,3,"Nicola-Yarred, Miss. Jamila",female,14.0,1,0,2651,11.2417,,C
41,0,3,"Ahlin, Mrs. Johan (Johanna Persdotter Larsson)",female,40.0,1,0,7546,9.475,,S
42,0,2,"Turpin, Mrs. William John Robert (Dorothy Ann Wonnacott)",female,27.0,1,0,11668,21.0,,S
43,0,3,"Kraeff, Mr. Theodor",male,29.69911764705882,0,0,349253,7.8958,,C
44,1,2,"Laroche, Miss. Simonne Marie Anne Andree",female,3.0,1,2,SC/Paris 2123,41.5792,,C
45,1,3,"Devaney, Miss. Margaret Delia",female,19.0,0,0,330958,7.8792,,Q
46,0,3,"Rogers, Mr. William John",male,29.69911764705882,0,0,S.C./A.4. 23567,8.05,,S
47,0,3,"Lennon, Mr. Denis",male,29.69911764705882,1,0,370371,15.5,,Q
48,1,3,"O'Driscoll, Miss. Bridget",female,29.69911764705882,0,0,14311,7.75,,Q
49,0,3,"Samaan, Mr. Youssef",male,29.69911764705882,2,0,2662,21.6792,,C
50,0,3,"Arnold-Franchi, Mrs. Josef (Josefine Franchi)",female,18.0,1,0,349237,17.8,,S
51,0,3,"Panula, Master. Juha Niilo",male,7.0,4,1,3101295,39.6875,,S
52,0,3,"Nosworthy, Mr. Richard Cater",male,21.0,0,0,A/4. 39886,7.8,,S
53,1,1,"Harper, Mrs. Henry Sleeper (Myna Haxtun)",female,49.0,1,0,PC 17572,76.7292,D33,C
54,1,2,"Faunthorpe, Mrs. Lizzie (Elizabeth Anne Wilkinson)",female,29.0,1,0,2926,26.0,,S
55,0,1,"Ostby, Mr. Engelhart Cornelius",male,65.0,0,1,113509,61.9792,B30,C
56,1,1,"Woolner, Mr. Hugh",male,29.69911764705882,0,0,19947,35.5,C52,S
57,1,2,"Rugg, Miss. Emily",female,21.0,0,0,C.A. 31026,10.5,,S
58,0,3,"Novel, Mr. Mansouer",male,28.5,0,0,2697,7.2292,,C
59,1,2,"West, Miss. Constance Mirium",female,5.0,1,2,C.A. 34651,27.75,,S
60,0,3,"Goodwin, Master. William Frederick",male,11.0,5,2,CA 2144,46.9,,S
61,0,3,"Sirayanian, Mr. Orsen",male,22.0,0,0,2669,7.2292,,C
62,1,1,"Icard, Miss. Amelie",female,38.0,0,0,113572,80.0,B28,
63,0,1,"Harris, Mr. Henry Birkhardt",male,45.0,1,0,36973,83.475,C83,S
64,0,3,"Skoog, Master. Harald",male,4.0,3,2,347088,27.9,,S
65,0,1,"Stewart, Mr. Albert A",male,29.69911764705882,0,0,PC 17605,27.7208,,C
66,1,3,"Moubarek, Master. Gerios",male,29.69911764705882,1,1,2661,15.2458,,C
67,1,2,"Nye, Mrs. (Elizabeth Ramell)",female,29.0,0,0,C.A. 29395,10.5,F33,S
68,0,3,"Crease, Mr. Ernest James",male,19.0,0,0,S.P. 3464,8.1583,,S
69,1,3,"Andersson, Miss. Erna Alexandra",female,17.0,4,2,3101281,7.925,,S
70,0,3,"Kink, Mr. Vincenz",male,26.0,2,0,315151,8.6625,,S
71,0,2,"Jenkin, Mr. Stephen Curnow",male,32.0,0,0,C.A. 33111,10.5,,S
72,0,3,"Goodwin, Miss. Lillian Amy",female,16.0,5,2,CA 2144,46.9,,S
73,0,2,"Hood, Mr. Ambrose Jr",male,21.0,0,0,S.O.C. 14879,73.5,,S
74,0,3,"Chronopoulos, Mr. Apostolos",male,26.0,1,0,2680,14.4542,,C
75,1,3,"Bing, Mr. Lee",male,32.0,0,0,1601,56.4958,,S
76,0,3,"Moen, Mr. Sigurd Hansen",male,25.0,0,0,348123,7.65,F G73,S
77,0,3,"Staneff, Mr. Ivan",male,29.69911764705882,0,0,349208,7.8958,,S
78,0,3,"Moutal, Mr. Rahamin Haim",male,29.69911764705882,0,0,374746,8.05,,S
79,1,2,"Caldwell, Master. Alden Gates",male,0.83,0,2,248738,29.0,,S
80,1,3,"Dowdell, Miss. Elizabeth",female,30.0,0,0,364516,12.475,,S
81,0,3,"Waelens, Mr. Achille",male,22.0,0,0,345767,9.0,,S
82,1,3,"Sheerlinck, Mr. Jan Baptist",male,29.0,0,0,345779,9.5,,S
83,1,3,"McDermott, Miss. Brigdet Delia",female,29.69911764705882,0,0,330932,7.7875,,Q
84,0,1,"Carrau, Mr. Francisco M",male,28.0,0,0,113059,47.1,,S
85,1,2,"Ilett, Miss. Bertha",female,17.0,0,0,SO/C 14885,10.5,,S
86,1,3,"Backstrom, Mrs. Karl Alfred (Maria Mathilda Gustafsson)",female,33.0,3,0,3101278,15.85,,S
87,0,3,"Ford, Mr. William Neal",male,16.0,1,3,W./C. 6608,34.375,,S
88,0,3,"Slocovski, Mr. Selman Francis",male,29.69911764705882,0,0,SOTON/OQ 392086,8.05,,S
89,1,1,"Fortune, Miss. Mabel Helen",female,23.0,3,2,19950,263.0,C23 C25 C27,S
90,0,3,"Celotti, Mr. Francesco",male,24.0,0,0,343275,8.05,,S
91,0,3,"Christmann, Mr. Emil",male,29.0,0,0,343276,8.05,,S
92,0,3,"Andreasson, Mr. Paul Edvin",male,20.0,0,0,347466,7.8542,,S
93,0,1,"Chaffee, Mr. Herbert Fuller",male,46.0,1,0,W.E.P. 5734,61.175,E31,S
94,0,3,"Dean, Mr. Bertram Frank",male,26.0,1,2,C.A. 2315,20.575,,S
95,0,3,"Coxon, Mr. Daniel",male,59.0,0,0,364500,7.25,,S
96,0,3,"Shorney, Mr. Charles Joseph",male,29.69911764705882,0,0,374910,8.05,,S
97,0,1,"Goldschmidt, Mr. George B",male,71.0,0,0,PC 17754,34.6542,A5,C
98,1,1,"Greenfield, Mr. William Bertram",male,23.0,0,1,PC 17759,63.3583,D10 D12,C
99,1,2,"Doling, Mrs. John T (Ada Julia Bone)",female,34.0,0,1,231919,23.0,,S
100,0,2,"Kantor, Mr. Sinai",male,34.0,1,0,244367,26.0,,S
101,0,3,"Petranec, Miss. Matilda",female,28.0,0,0,349245,7.8958,,S
102,0,3,"Petroff, Mr. Pastcho (""Pentcho"")",male,29.69911764705882,0,0,349215,7.8958,,S
103,0,1,"White, Mr. Richard Frasar",male,21.0,0,1,35281,77.2875,D26,S
104,0,3,"Johansson, Mr. Gustaf Joel",male,33.0,0,0,7540,8.6542,,S
105,0,3,"Gustafsson, Mr. Anders Vilhelm",male,37.0,2,0,3101276,7.925,,S
106,0,3,"Mionoff, Mr. Stoytcho",male,28.0,0,0,349207,7.8958,,S
107,1,3,"Salkjelsvik, Miss. Anna Kristine",female,21.0,0,0,343120,7.65,,S
108,1,3,"Moss, Mr. Albert Johan",male,29.69911764705882,0,0,312991,7.775,,S
109,0,3,"Rekic, Mr. Tido",male,38.0,0,0,349249,7.8958,,S
110,1,3,"Moran, Miss. Bertha",female,29.69911764705882,1,0,371110,24.15,,Q
111,0,1,"Porter, Mr. Walter Chamberlain",male,47.0,0,0,110465,52.0,C110,S
112,0,3,"Zabour, Miss. Hileni",female,14.5,1,0,2665,14.4542,,C
113,0,3,"Barton, Mr. David John",male,22.0,0,0,324669,8.05,,S
114,0,3,"Jussila, Miss. Katriina",female,20.0,1,0,4136,9.825,,S
115,0,3,"Attalah, Miss. Malake",female,17.0,0,0,2627,14.4583,,C
116,0,3,"Pekoniemi, Mr. Edvard",male,21.0,0,0,STON/O 2. 3101294,7.925,,S
117,0,3,"Connors, Mr. Patrick",male,70.5,0,0,370369,7.75,,Q
118,0,2,"Turpin, Mr. William John Robert",male,29.0,1,0,11668,21.0,,S
119,0,1,"Baxter, Mr. Quigg Edmond",male,24.0,0,1,PC 17558,247.5208,B58 B60,C
120,0,3,"Andersson, Miss. Ellis Anna Maria",female,2.0,4,2,347082,31.275,,S
121,0,2,"Hickman, Mr. Stanley George",male,21.0,2,0,S.O.C. 14879,73.5,,S
122,0,3,"Moore, Mr. Leonard Charles",male,29.69911764705882,0,0,A4. 54510,8.05,,S
123,0,2,"Nasser, Mr. Nicholas",male,32.5,1,0,237736,30.0708,,C
124,1,2,"Webber, Miss. Susan",female,32.5,0,0,27267,13.0,E101,S
125,0,1,"White, Mr. Percival Wayland",male,54.0,0,1,35281,77.2875,D26,S
126,1,3,"Nicola-Yarred, Master. Elias",male,12.0,1,0,2651,11.2417,,C
127,0,3,"McMahon, Mr. Martin",male,29.69911764705882,0,0,370372,7.75,,Q
128,1,3,"Madsen, Mr. Fridtjof Arne",male,24.0,0,0,C 17369,7.1417,,S
129,1,3,"Peter, Miss. Anna",female,29.69911764705882,1,1,2668,22.3583,F E69,C
130,0,3,"Ekstrom, Mr. Johan",male,45.0,0,0,347061,6.975,,S
131,0,3,"Drazenoic, Mr. Jozef",male,33.0,0,0,349241,7.8958,,C
132,0,3,"Coelho, Mr. Domingos Fernandeo",male,20.0,0,0,SOTON/O.Q. 3101307,7.05,,S
133,0,3,"Robins, Mrs. Alexander A (Grace Charity Laury)",female,47.0,1,0,A/5. 3337,14.5,,S
134,1,2,"Weisz, Mrs. Leopold (Mathilde Francoise Pede)",female,29.0,1,0,228414,26.0,,S
135,0,2,"Sobey, Mr. Samuel James Hayden",male,25.0,0,0,C.A. 29178,13.0,,S
136,0,2,"Richard, Mr. Emile",male,23.0,0,0,SC/PARIS 2133,15.0458,,C
137,1,1,"Newsom, Miss. Helen Monypeny",female,19.0,0,2,11752,26.2833,D47,S
138,0,1,"Futrelle, Mr. Jacques Heath",male,37.0,1,0,113803,53.1,C123,S
139,0,3,"Osen, Mr. Olaf Elon",male,16.0,0,0,7534,9.2167,,S
140,0,1,"Giglio, Mr. Victor",male,24.0,0,0,PC 17593,79.2,B86,C
141,0,3,"Boulos, Mrs. Joseph (Sultana)",female,29.69911764705882,0,2,2678,15.2458,,C
142,1,3,"Nysten, Miss. Anna Sofia",female,22.0,0,0,347081,7.75,,S
143,1,3,"Hakkarainen, Mrs. Pekka Pietari (Elin Matilda Dolck)",female,24.0,1,0,STON/O2. 3101279,15.85,,S
144,0,3,"Burke, Mr. Jeremiah",male,19.0,0,0,365222,6.75,,Q
145,0,2,"Andrew, Mr. Edgardo Samuel",male,18.0,0,0,231945,11.5,,S
146,0,2,"Nicholls, Mr. Joseph Charles",male,19.0,1,1,C.A. 33112,36.75,,S
147,1,3,"Andersson, Mr. August Edvard (""Wennerstrom"")",male,27.0,0,0,350043,7.7958,,S
148,0,3,"Ford, Miss. Robina Maggie ""Ruby""",female,9.0,2,2,W./C. 6608,34.375,,S
149,0,2,"Navratil, Mr. Michel (""Louis M Hoffman"")",male,36.5,0,2,230080,26.0,F2,S
150,0,2,"Byles, Rev. Thomas Roussel Davids",male,42.0,0,0,244310,13.0,,S
151,0,2,"Bateman, Rev. Robert James",male,51.0,0,0,S.O.P. 1166,12.525,,S
152,1,1,"Pears, Mrs. Thomas (Edith Wearne)",female,22.0,1,0,113776,66.6,C2,S
153,0,3,"Meo, Mr. Alfonzo",male,55.5,0,0,A.5. 11206,8.05,,S
154,0,3,"van Billiard, Mr. Austin Blyler",male,40.5,0,2,A/5. 851,14.5,,S
155,0,3,"Olsen, Mr. Ole Martin",male,29.69911764705882,0,0,Fa 265302,7.3125,,S
156,0,1,"Williams, Mr. Charles Duane",male,51.0,0,1,PC 17597,61.3792,,C
157,1,3,"Gilnagh, Miss. Katherine ""Katie""",female,16.0,0,0,35851,7.7333,,Q
158,0,3,"Corn, Mr. Harry",male,30.0,0,0,SOTON/OQ 392090,8.05,,S
159,0,3,"Smiljanic, Mr. Mile",male,29.69911764705882,0,0,315037,8.6625,,S
160,0,3,"Sage, Master. Thomas Henry",male,29.69911764705882,8,2,CA. 2343,69.55,,S
161,0,3,"Cribb, Mr. John Hatfield",male,44.0,0,1,371362,16.1,,S
162,1,2,"Watt, Mrs. James (Elizabeth ""Bessie"" Inglis Milne)",female,40.0,0,0,C.A. 33595,15.75,,S
163,0,3,"Bengtsson, Mr. John Viktor",male,26.0,0,0,347068,7.775,,S
164,0,3,"Calic, Mr. Jovo",male,17.0,0,0,315093,8.6625,,S
165,0,3,"Panula, Master. Eino Viljami",male,1.0,4,1,3101295,39.6875,,S
166,1,3,"Goldsmith, Master. Frank John William ""Frankie""",male,9.0,0,2,363291,20.525,,S
167,1,1,"Chibnall, Mrs. (Edith Martha Bowerman)",female,29.69911764705882,0,1,113505,55.0,E33,S
168,0,3,"Skoog, Mrs. William (Anna Bernhardina Karlsson)",female,45.0,1,4,347088,27.9,,S
169,0,1,"Baumann, Mr. John D",male,29.69911764705882,0,0,PC 17318,25.925,,S
170,0,3,"Ling, Mr. Lee",male,28.0,0,0,1601,56.4958,,S
171,0,1,"Van der hoef, Mr. Wyckoff",male,61.0,0,0,111240,33.5,B19,S
172,0,3,"Rice, Master. Arthur",male,4.0,4,1,382652,29.125,,Q
173,1,3,"Johnson, Miss. Eleanor Ileen",female,1.0,1,1,347742,11.1333,,S
174,0,3,"Sivola, Mr. Antti Wilhelm",male,21.0,0,0,STON/O 2. 3101280,7.925,,S
175,0,1,"Smith, Mr. James Clinch",male,56.0,0,0,17764,30.6958,A7,C
176,0,3,"Klasen, Mr. Klas Albin",male,18.0,1,1,350404,7.8542,,S
177,0,3,"Lefebre, Master. Henry Forbes",male,29.69911764705882,3,1,4133,25.4667,,S
178,0,1,"Isham, Miss. Ann Elizabeth",female,50.0,0,0,PC 17595,28.7125,C49,C
179,0,2,"Hale, Mr. Reginald",male,30.0,0,0,250653,13.0,,S
180,0,3,"Leonard, Mr. Lionel",male,36.0,0,0,LINE,0.0,,S
181,0,3,"Sage, Miss. Constance Gladys",female,29.69911764705882,8,2,CA. 2343,69.55,,S
182,0,2,"Pernot, Mr. Rene",male,29.69911764705882,0,0,SC/PARIS 2131,15.05,,C
183,0,3,"Asplund, Master. Clarence Gustaf Hugo",male,9.0,4,2,347077,31.3875,,S
184,1,2,"Becker, Master. Richard F",male,1.0,2,1,230136,39.0,F4,S
185,1,3,"Kink-Heilmann, Miss. Luise Gretchen",female,4.0,0,2,315153,22.025,,S
186,0,1,"Rood, Mr. Hugh Roscoe",male,29.69911764705882,0,0,113767,50.0,A32,S
187,1,3,"O'Brien, Mrs. Thomas (Johanna ""Hannah"" Godfrey)",female,29.69911764705882,1,0,370365,15.5,,Q
188,1,1,"Romaine, Mr. Charles Hallace (""Mr C Rolmane"")",male,45.0,0,0,111428,26.55,,S
189,0,3,"Bourke, Mr. John",male,40.0,1,1,364849,15.5,,Q
190,0,3,"Turcin, Mr. Stjepan",male,36.0,0,0,349247,7.8958,,S
191,1,2,"Pinsky, Mrs. (Rosa)",female,32.0,0,0,234604,13.0,,S
192,0,2,"Carbines, Mr. William",male,19.0,0,0,28424,13.0,,S
193,1,3,"Andersen-Jensen, Miss. Carla Christine Nielsine",female,19.0,1,0,350046,7.8542,,S
194,1,2,"Navratil, Master. Michel M",male,3.0,1,1,230080,26.0,F2,S
195,1,1,"Brown, Mrs. James Joseph (Margaret Tobin)",female,44.0,0,0,PC 17610,27.7208,B4,C
196,1,1,"Lurette, Miss. Elise",female,58.0,0,0,PC 17569,146.5208,B80,C
197,0,3,"Mernagh, Mr. Robert",male,29.69911764705882,0,0,368703,7.75,,Q
198,0,3,"Olsen, Mr. Karl Siegwart Andreas",male,42.0,0,1,4579,8.4042,,S
199,1,3,"Madigan, Miss. Margaret ""Maggie""",female,29.69911764705882,0,0,370370,7.75,,Q
200,0,2,"Yrois, Miss. Henriette (""Mrs Harbeck"")",female,24.0,0,0,248747,13.0,,S
201,0,3,"Vande Walle, Mr. Nestor Cyriel",male,28.0,0,0,345770,9.5,,S
202,0,3,"Sage, Mr. Frederick",male,29.69911764705882,8,2,CA. 2343,69.55,,S
203,0,3,"Johanson, Mr. Jakob Alfred",male,34.0,0,0,3101264,6.4958,,S
204,0,3,"Youseff, Mr. Gerious",male,45.5,0,0,2628,7.225,,C
205,1,3,"Cohen, Mr. Gurshon ""Gus""",male,18.0,0,0,A/5 3540,8.05,,S
206,0,3,"Strom, Miss. Telma Matilda",female,2.0,0,1,347054,10.4625,G6,S
207,0,3,"Backstrom, Mr. Karl Alfred",male,32.0,1,0,3101278,15.85,,S
208,1,3,"Albimona, Mr. Nassef Cassem",male,26.0,0,0,2699,18.7875,,C
209,1,3,"Carr, Miss. Helen ""Ellen""",female,16.0,0,0,367231,7.75,,Q
210,1,1,"Blank, Mr. Henry",male,40.0,0,0,112277,31.0,A31,C
211,0,3,"Ali, Mr. Ahmed",male,24.0,0,0,SOTON/O.Q. 3101311,7.05,,S
212,1,2,"Cameron, Miss. Clear Annie",female,35.0,0,0,F.C.C. 13528,21.0,,S
213,0,3,"Perkin, Mr. John Henry",male,22.0,0,0,A/5 21174,7.25,,S
214,0,2,"Givard, Mr. Hans Kristensen",male,30.0,0,0,250646,13.0,,S
215,0,3,"Kiernan, Mr. Philip",male,29.69911764705882,1,0,367229,7.75,,Q
216,1,1,"Newell, Miss. Madeleine",female,31.0,1,0,35273,113.275,D36,C
217,1,3,"Honkanen, Miss. Eliina",female,27.0,0,0,STON/O2. 3101283,7.925,,S
218,0,2,"Jacobsohn, Mr. Sidney Samuel",male,42.0,1,0,243847,27.0,,S
219,1,1,"Bazzani, Miss. Albina",female,32.0,0,0,11813,76.2917,D15,C
220,0,2,"Harris, Mr. Walter",male,30.0,0,0,W/C 14208,10.5,,S
221,1,3,"Sunderland, Mr. Victor Francis",male,16.0,0,0,SOTON/OQ 392089,8.05,,S
222,0,2,"Bracken, Mr. James H",male,27.0,0,0,220367,13.0,,S
223,0,3,"Green, Mr. George Henry",male,51.0,0,0,21440,8.05,,S
224,0,3,"Nenkoff, Mr. Christo",male,29.69911764705882,0,0,349234,7.8958,,S
225,1,1,"Hoyt, Mr. Frederick Maxfield",male,38.0,1,0,19943,90.0,C93,S
226,0,3,"Berglund, Mr. Karl Ivar Sven",male,22.0,0,0,PP 4348,9.35,,S
227,1,2,"Mellors, Mr. William John",male,19.0,0,0,SW/PP 751,10.5,,S
228,0,3,"Lovell, Mr. John Hall (""Henry"")",male,20.5,0,0,A/5 21173,7.25,,S
229,0,2,"Fahlstrom, Mr. Arne Jonas",male,18.0,0,0,236171,13.0,,S
230,0,3,"Lefebre, Miss. Mathilde",female,29.69911764705882,3,1,4133,25.4667,,S
231,1,1,"Harris, Mrs. Henry Birkhardt (Irene Wallach)",female,35.0,1,0,36973,83.475,C83,S
232,0,3,"Larsson, Mr. Bengt Edvin",male,29.0,0,0,347067,7.775,,S
233,0,2,"Sjostedt, Mr. Ernst Adolf",male,59.0,0,0,237442,13.5,,S
234,1,3,"Asplund, Miss. Lillian Gertrud",female,5.0,4,2,347077,31.3875,,S
235,0,2,"Leyson, Mr. Robert William Norman",male,24.0,0,0,C.A. 29566,10.5,,S
236,0,3,"Harknett, Miss. Alice Phoebe",female,29.69911764705882,0,0,W./C. 6609,7.55,,S
237,0,2,"Hold, Mr. Stephen",male,44.0,1,0,26707,26.0,,S
238,1,2,"Collyer, Miss. Marjorie ""Lottie""",female,8.0,0,2,C.A. 31921,26.25,,S
239,0,2,"Pengelly, Mr. Frederick William",male,19.0,0,0,28665,10.5,,S
240,0,2,"Hunt, Mr. George Henry",male,33.0,0,0,SCO/W 1585,12.275,,S
241,0,3,"Zabour, Miss. Thamine",female,29.69911764705882,1,0,2665,14.4542,,C
242,1,3,"Murphy, Miss. Katherine ""Kate""",female,29.69911764705882,1,0,367230,15.5,,Q
243,0,2,"Coleridge, Mr. Reginald Charles",male,29.0,0,0,W./C. 14263,10.5,,S
244,0,3,"Maenpaa, Mr. Matti Alexanteri",male,22.0,0,0,STON/O 2. 3101275,7.125,,S
245,0,3,"Attalah, Mr. Sleiman",male,30.0,0,0,2694,7.225,,C
246,0,1,"Minahan, Dr. William Edward",male,44.0,2,0,19928,90.0,C78,Q
247,0,3,"Lindahl, Miss. Agda Thorilda Viktoria",female,25.0,0,0,347071,7.775,,S
248,1,2,"Hamalainen, Mrs. William (Anna)",female,24.0,0,2,250649,14.5,,S
249,1,1,"Beckwith, Mr. Richard Leonard",male,37.0,1,1,11751,52.5542,D35,S
250,0,2,"Carter, Rev. Ernest Courtenay",male,54.0,1,0,244252,26.0,,S
251,0,3,"Reed, Mr. James George",male,29.69911764705882,0,0,362316,7.25,,S
252,0,3,"Strom, Mrs. Wilhelm (Elna Matilda Persson)",female,29.0,1,1,347054,10.4625,G6,S
253,0,1,"Stead, Mr. William Thomas",male,62.0,0,0,113514,26.55,C87,S
254,0,3,"Lobb, Mr. William Arthur",male,30.0,1,0,A/5. 3336,16.1,,S
255,0,3,"Rosblom, Mrs. Viktor (Helena Wilhelmina)",female,41.0,0,2,370129,20.2125,,S
256,1,3,"Touma, Mrs. Darwis (Hanne Youssef Razi)",female,29.0,0,2,2650,15.2458,,C
257,1,1,"Thorne, Mrs. Gertrude Maybelle",female,29.69911764705882,0,0,PC 17585,79.2,,C
258,1,1,"Cherry, Miss. Gladys",female,30.0,0,0,110152,86.5,B77,S
259,1,1,"Ward, Miss. Anna",female,35.0,0,0,PC 17755,512.3292,,C
260,1,2,"Parrish, Mrs. (Lutie Davis)",female,50.0,0,1,230433,26.0,,S
261,0,3,"Smith, Mr. Thomas",male,29.69911764705882,0,0,384461,7.75,,Q
262,1,3,"Asplund, Master. Edvin Rojj Felix",male,3.0,4,2,347077,31.3875,,S
263,0,1,"Taussig, Mr. Emil",male,52.0,1,1,110413,79.65,E67,S
264,0,1,"Harrison, Mr. William",male,40.0,0,0,112059,0.0,B94,S
265,0,3,"Henry, Miss. Delia",female,29.69911764705882,0,0,382649,7.75,,Q
266,0,2,"Reeves, Mr. David",male,36.0,0,0,C.A. 17248,10.5,,S
267,0,3,"Panula, Mr. Ernesti Arvid",male,16.0,4,1,3101295,39.6875,,S
268,1,3,"Persson, Mr. Ernst Ulrik",male,25.0,1,0,347083,7.775,,S
269,1,1,"Graham, Mrs. William Thompson (Edith Junkins)",female,58.0,0,1,PC 17582,153.4625,C125,S
270,1,1,"Bissette, Miss. Amelia",female,35.0,0,0,PC 17760,135.6333,C99,S
271,0,1,"Cairns, Mr. Alexander",male,29.69911764705882,0,0,113798,31.0,,S
272,1,3,"Tornquist, Mr. William Henry",male,25.0,0,0,LINE,0.0,,S
273,1,2,"Mellinger, Mrs. (Elizabeth Anne Maidment)",female,41.0,0,1,250644,19.5,,S
274,0,1,"Natsch, Mr. Charles H",male,37.0,0,1,PC 17596,29.7,C118,C
275,1,3,"Healy, Miss. Hanora ""Nora""",female,29.69911764705882,0,0,370375,7.75,,Q
276,1,1,"Andrews, Miss. Kornelia Theodosia",female,63.0,1,0,13502,77.9583,D7,S
277,0,3,"Lindblom, Miss. Augusta Charlotta",female,45.0,0,0,347073,7.75,,S
278,0,2,"Parkes, Mr. Francis ""Frank""",male,29.69911764705882,0,0,239853,0.0,,S
279,0,3,"Rice, Master. Eric",male,7.0,4,1,382652,29.125,,Q
280,1,3,"Abbott, Mrs. Stanton (Rosa Hunt)",female,35.0,1,1,C.A. 2673,20.25,,S
281,0,3,"Duane, Mr. Frank",male,65.0,0,0,336439,7.75,,Q
282,0,3,"Olsson, Mr. Nils Johan Goransson",male,28.0,0,0,347464,7.8542,,S
283,0,3,"de Pelsmaeker, Mr. Alfons",male,16.0,0,0,345778,9.5,,S
284,1,3,"Dorking, Mr. Edward Arthur",male,19.0,0,0,A/5. 10482,8.05,,S
285,0,1,"Smith, Mr. Richard William",male,29.69911764705882,0,0,113056,26.0,A19,S
286,0,3,"Stankovic, Mr. Ivan",male,33.0,0,0,349239,8.6625,,C
287,1,3,"de Mulder, Mr. Theodore",male,30.0,0,0,345774,9.5,,S
288,0,3,"Naidenoff, Mr. Penko",male,22.0,0,0,349206,7.8958,,S
289,1,2,"Hosono, Mr. Masabumi",male,42.0,0,0,237798,13.0,,S
290,1,3,"Connolly, Miss. Kate",female,22.0,0,0,370373,7.75,,Q
291,1,1,"Barber, Miss. Ellen ""Nellie""",female,26.0,0,0,19877,78.85,,S
292,1,1,"Bishop, Mrs. Dickinson H (Helen Walton)",female,19.0,1,0,11967,91.0792,B49,C
293,0,2,"Levy, Mr. Rene Jacques",male,36.0,0,0,SC/Paris 2163,12.875,D,C
294,0,3,"Haas, Miss. Aloisia",female,24.0,0,0,349236,8.85,,S
295,0,3,"Mineff, Mr. Ivan",male,24.0,0,0,349233,7.8958,,S
296,0,1,"Lewy, Mr. Ervin G",male,29.69911764705882,0,0,PC 17612,27.7208,,C
297,0,3,"Hanna, Mr. Mansour",male,23.5,0,0,2693,7.2292,,C
298,0,1,"Allison, Miss. Helen Loraine",female,2.0,1,2,113781,151.55,C22 C26,S
299,1,1,"Saalfeld, Mr. Adolphe",male,29.69911764705882,0,0,19988,30.5,C106,S
300,1,1,"Baxter, Mrs. James (Helene DeLaudeniere Chaput)",female,50.0,0,1,PC 17558,247.5208,B58 B60,C
301,1,3,"Kelly, Miss. Anna Katherine ""Annie Kate""",female,29.69911764705882,0,0,9234,7.75,,Q
302,1,3,"McCoy, Mr. Bernard",male,29.69911764705882,2,0,367226,23.25,,Q
303,0,3,"Johnson, Mr. William Cahoone Jr",male,19.0,0,0,LINE,0.0,,S
304,1,2,"Keane, Miss. Nora A",female,29.69911764705882,0,0,226593,12.35,E101,Q
305,0,3,"Williams, Mr. Howard Hugh ""Harry""",male,29.69911764705882,0,0,A/5 2466,8.05,,S
306,1,1,"Allison, Master. Hudson Trevor",male,0.92,1,2,113781,151.55,C22 C26,S
307,1,1,"Fleming, Miss. Margaret",female,29.69911764705882,0,0,17421,110.8833,,C
308,1,1,"Penasco y Castellana, Mrs. Victor de Satode (Maria Josefa Perez de Soto y Vallejo)",female,17.0,1,0,PC 17758,108.9,C65,C
309,0,2,"Abelson, Mr. Samuel",male,30.0,1,0,P/PP 3381,24.0,,C
310,1,1,"Francatelli, Miss. Laura Mabel",female,30.0,0,0,PC 17485,56.9292,E36,C
311,1,1,"Hays, Miss. Margaret Bechstein",female,24.0,0,0,11767,83.1583,C54,C
312,1,1,"Ryerson, Miss. Emily Borie",female,18.0,2,2,PC 17608,262.375,B57 B59 B63 B66,C
313,0,2,"Lahtinen, Mrs. William (Anna Sylfven)",female,26.0,1,1,250651,26.0,,S
314,0,3,"Hendekovic, Mr. Ignjac",male,28.0,0,0,349243,7.8958,,S
315,0,2,"Hart, Mr. Benjamin",male,43.0,1,1,F.C.C. 13529,26.25,,S
316,1,3,"Nilsson, Miss. Helmina Josefina",female,26.0,0,0,347470,7.8542,,S
317,1,2,"Kantor, Mrs. Sinai (Miriam Sternin)",female,24.0,1,0,244367,26.0,,S
318,0,2,"Moraweck, Dr. Ernest",male,54.0,0,0,29011,14.0,,S
319,1,1,"Wick, Miss. Mary Natalie",female,31.0,0,2,36928,164.8667,C7,S
320,1,1,"Spedden, Mrs. Frederic Oakley (Margaretta Corning Stone)",female,40.0,1,1,16966,134.5,E34,C
321,0,3,"Dennis, Mr. Samuel",male,22.0,0,0,A/5 21172,7.25,,S
322,0,3,"Danoff, Mr. Yoto",male,27.0,0,0,349219,7.8958,,S
323,1,2,"Slayter, Miss. Hilda Mary",female,30.0,0,0,234818,12.35,,Q
324,1,2,"Caldwell, Mrs. Albert Francis (Sylvia Mae Harbaugh)",female,22.0,1,1,248738,29.0,,S
325,0,3,"Sage, Mr. George John Jr",male,29.69911764705882,8,2,CA. 2343,69.55,,S
326,1,1,"Young, Miss. Marie Grice",female,36.0,0,0,PC 17760,135.6333,C32,C
327,0,3,"Nysveen, Mr. Johan Hansen",male,61.0,0,0,345364,6.2375,,S
328,1,2,"Ball, Mrs. (Ada E Hall)",female,36.0,0,0,28551,13.0,D,S
329,1,3,"Goldsmith, Mrs. Frank John (Emily Alice Brown)",female,31.0,1,1,363291,20.525,,S
330,1,1,"Hippach, Miss. Jean Gertrude",female,16.0,0,1,111361,57.9792,B18,C
331,1,3,"McCoy, Miss. Agnes",female,29.69911764705882,2,0,367226,23.25,,Q
332,0,1,"Partner, Mr. Austen",male,45.5,0,0,113043,28.5,C124,S
333,0,1,"Graham, Mr. George Edward",male,38.0,0,1,PC 17582,153.4625,C91,S
334,0,3,"Vander Planke, Mr. Leo Edmondus",male,16.0,2,0,345764,18.0,,S
335,1,1,"Frauenthal, Mrs. Henry William (Clara Heinsheimer)",female,29.69911764705882,1,0,PC 17611,133.65,,S
336,0,3,"Denkoff, Mr. Mitto",male,29.69911764705882,0,0,349225,7.8958,,S
337,0,1,"Pears, Mr. Thomas Clinton",male,29.0,1,0,113776,66.6,C2,S
338,1,1,"Burns, Miss. Elizabeth Margaret",female,41.0,0,0,16966,134.5,E40,C
339,1,3,"Dahl, Mr. Karl Edwart",male,45.0,0,0,7598,8.05,,S
340,0,1,"Blackwell, Mr. Stephen Weart",male,45.0,0,0,113784,35.5,T,S
341,1,2,"Navratil, Master. Edmond Roger",male,2.0,1,1,230080,26.0,F2,S
342,1,1,"Fortune, Miss. Alice Elizabeth",female,24.0,3,2,19950,263.0,C23 C25 C27,S
343,0,2,"Collander, Mr. Erik Gustaf",male,28.0,0,0,248740,13.0,,S
344,0,2,"Sedgwick, Mr. Charles Frederick Waddington",male,25.0,0,0,244361,13.0,,S
345,0,2,"Fox, Mr. Stanley Hubert",male,36.0,0,0,229236,13.0,,S
346,1,2,"Brown, Miss. Amelia ""Mildred""",female,24.0,0,0,248733,13.0,F33,S
347,1,2,"Smith, Miss. Marion Elsie",female,40.0,0,0,31418,13.0,,S
348,1,3,"Davison, Mrs. Thomas Henry (Mary E Finck)",female,29.69911764705882,1,0,386525,16.1,,S
349,1,3,"Coutts, Master. William Loch ""William""",male,3.0,1,1,C.A. 37671,15.9,,S
350,0,3,"Dimic, Mr. Jovan",male,42.0,0,0,315088,8.6625,,S
351,0,3,"Odahl, Mr. Nils Martin",male,23.0,0,0,7267,9.225,,S
352,0,1,"Williams-Lambert, Mr. Fletcher Fellows",male,29.69911764705882,0,0,113510,35.0,C128,S
353,0,3,"Elias, Mr. Tannous",male,15.0,1,1,2695,7.2292,,C
354,0,3,"Arnold-Franchi, Mr. Josef",male,25.0,1,0,349237,17.8,,S
355,0,3,"Yousif, Mr. Wazli",male,29.69911764705882,0,0,2647,7.225,,C
356,0,3,"Vanden Steen, Mr. Leo Peter",male,28.0,0,0,345783,9.5,,S
357,1,1,"Bowerman, Miss. Elsie Edith",female,22.0,0,1,113505,55.0,E33,S
358,0,2,"Funk, Miss. Annie Clemmer",female,38.0,0,0,237671,13.0,,S
359,1,3,"McGovern, Miss. Mary",female,29.69911764705882,0,0,330931,7.8792,,Q
360,1,3,"Mockler, Miss. Helen Mary ""Ellie""",female,29.69911764705882,0,0,330980,7.8792,,Q
361,0,3,"Skoog, Mr. Wilhelm",male,40.0,1,4,347088,27.9,,S
362,0,2,"del Carlo, Mr. Sebastiano",male,29.0,1,0,SC/PARIS 2167,27.7208,,C
363,0,3,"Barbara, Mrs. (Catherine David)",female,45.0,0,1,2691,14.4542,,C
364,0,3,"Asim, Mr. Adola",male,35.0,0,0,SOTON/O.Q. 3101310,7.05,,S
365,0,3,"O'Brien, Mr. Thomas",male,29.69911764705882,1,0,370365,15.5,,Q
366,0,3,"Adahl, Mr. Mauritz Nils Martin",male,30.0,0,0,C 7076,7.25,,S
367,1,1,"Warren, Mrs. Frank Manley (Anna Sophia Atkinson)",female,60.0,1,0,110813,75.25,D37,C
368,1,3,"Moussa, Mrs. (Mantoura Boulos)",female,29.69911764705882,0,0,2626,7.2292,,C
369,1,3,"Jermyn, Miss. Annie",female,29.69911764705882,0,0,14313,7.75,,Q
370,1,1,"Aubart, Mme. Leontine Pauline",female,24.0,0,0,PC 17477,69.3,B35,C
371,1,1,"Harder, Mr. George Achilles",male,25.0,1,0,11765,55.4417,E50,C
372,0,3,"Wiklund, Mr. Jakob Alfred",male,18.0,1,0,3101267,6.4958,,S
373,0,3,"Beavan, Mr. William Thomas",male,19.0,0,0,323951,8.05,,S
374,0,1,"Ringhini, Mr. Sante",male,22.0,0,0,PC 17760,135.6333,,C
375,0,3,"Palsson, Miss. Stina Viola",female,3.0,3,1,349909,21.075,,S
376,1,1,"Meyer, Mrs. Edgar Joseph (Leila Saks)",female,29.69911764705882,1,0,PC 17604,82.1708,,C
377,1,3,"Landergren, Miss. Aurora Adelia",female,22.0,0,0,C 7077,7.25,,S
378,0,1,"Widener, Mr. Harry Elkins",male,27.0,0,2,113503,211.5,C82,C
379,0,3,"Betros, Mr. Tannous",male,20.0,0,0,2648,4.0125,,C
380,0,3,"Gustafsson, Mr. Karl Gideon",male,19.0,0,0,347069,7.775,,S
381,1,1,"Bidois, Miss. Rosalie",female,42.0,0,0,PC 17757,227.525,,C
382,1,3,"Nakid, Miss. Maria (""Mary"")",female,1.0,0,2,2653,15.7417,,C
383,0,3,"Tikkanen, Mr. Juho",male,32.0,0,0,STON/O 2. 3101293,7.925,,S
384,1,1,"Holverson, Mrs. Alexander Oskar (Mary Aline Towner)",female,35.0,1,0,113789,52.0,,S
385,0,3,"Plotcharsky, Mr. Vasil",male,29.69911764705882,0,0,349227,7.8958,,S
386,0,2,"Davies, Mr. Charles Henry",male,18.0,0,0,S.O.C. 14879,73.5,,S
387,0,3,"Goodwin, Master. Sidney Leonard",male,1.0,5,2,CA 2144,46.9,,S
388,1,2,"Buss, Miss. Kate",female,36.0,0,0,27849,13.0,,S
389,0,3,"Sadlier, Mr. Matthew",male,29.69911764705882,0,0,367655,7.7292,,Q
390,1,2,"Lehmann, Miss. Bertha",female,17.0,0,0,SC 1748,12.0,,C
391,1,1,"Carter, Mr. William Ernest",male,36.0,1,2,113760,120.0,B96 B98,S
392,1,3,"Jansson, Mr. Carl Olof",male,21.0,0,0,350034,7.7958,,S
393,0,3,"Gustafsson, Mr. Johan Birger",male,28.0,2,0,3101277,7.925,,S
394,1,1,"Newell, Miss. Marjorie",female,23.0,1,0,35273,113.275,D36,C
395,1,3,"Sandstrom, Mrs. Hjalmar (Agnes Charlotta Bengtsson)",female,24.0,0,2,PP 9549,16.7,G6,S
396,0,3,"Johansson, Mr. Erik",male,22.0,0,0,350052,7.7958,,S
397,0,3,"Olsson, Miss. Elina",female,31.0,0,0,350407,7.8542,,S
398,0,2,"McKane, Mr. Peter David",male,46.0,0,0,28403,26.0,,S
399,0,2,"Pain, Dr. Alfred",male,23.0,0,0,244278,10.5,,S
400,1,2,"Trout, Mrs. William H (Jessie L)",female,28.0,0,0,240929,12.65,,S
401,1,3,"Niskanen, Mr. Juha",male,39.0,0,0,STON/O 2. 3101289,7.925,,S
402,0,3,"Adams, Mr. John",male,26.0,0,0,341826,8.05,,S
403,0,3,"Jussila, Miss. Mari Aina",female,21.0,1,0,4137,9.825,,S
404,0,3,"Hakkarainen, Mr. Pekka Pietari",male,28.0,1,0,STON/O2. 3101279,15.85,,S
405,0,3,"Oreskovic, Miss. Marija",female,20.0,0,0,315096,8.6625,,S
406,0,2,"Gale, Mr. Shadrach",male,34.0,1,0,28664,21.0,,S
407,0,3,"Widegren, Mr. Carl/Charles Peter",male,51.0,0,0,347064,7.75,,S
408,1,2,"Richards, Master. William Rowe",male,3.0,1,1,29106,18.75,,S
409,0,3,"Birkeland, Mr. Hans Martin Monsen",male,21.0,0,0,312992,7.775,,S
410,0,3,"Lefebre, Miss. Ida",female,29.69911764705882,3,1,4133,25.4667,,S
411,0,3,"Sdycoff, Mr. Todor",male,29.69911764705882,0,0,349222,7.8958,,S
412,0,3,"Hart, Mr. Henry",male,29.69911764705882,0,0,394140,6.8583,,Q
413,1,1,"Minahan, Miss. Daisy E",female,33.0,1,0,19928,90.0,C78,Q
414,0,2,"Cunningham, Mr. Alfred Fleming",male,29.69911764705882,0,0,239853,0.0,,S
415,1,3,"Sundman, Mr. Johan Julian",male,44.0,0,0,STON/O 2. 3101269,7.925,,S
416,0,3,"Meek, Mrs. Thomas (Annie Louise Rowley)",female,29.69911764705882,0,0,343095,8.05,,S
417,1,2,"Drew, Mrs. James Vivian (Lulu Thorne Christian)",female,34.0,1,1,28220,32.5,,S
418,1,2,"Silven, Miss. Lyyli Karoliina",female,18.0,0,2,250652,13.0,,S
419,0,2,"Matthews, Mr. William John",male,30.0,0,0,28228,13.0,,S
420,0,3,"Van Impe, Miss. Catharina",female,10.0,0,2,345773,24.15,,S
421,0,3,"Gheorgheff, Mr. Stanio",male,29.69911764705882,0,0,349254,7.8958,,C
422,0,3,"Charters, Mr. David",male,21.0,0,0,A/5. 13032,7.7333,,Q
423,0,3,"Zimmerman, Mr. Leo",male,29.0,0,0,315082,7.875,,S
424,0,3,"Danbom, Mrs. Ernst Gilbert (Anna Sigrid Maria Brogren)",female,28.0,1,1,347080,14.4,,S
425,0,3,"Rosblom, Mr. Viktor Richard",male,18.0,1,1,370129,20.2125,,S
426,0,3,"Wiseman, Mr. Phillippe",male,29.69911764705882,0,0,A/4. 34244,7.25,,S
427,1,2,"Clarke, Mrs. Charles V (Ada Maria Winfield)",female,28.0,1,0,2003,26.0,,S
428,1,2,"Phillips, Miss. Kate Florence (""Mrs Kate Louise Phillips Marshall"")",female,19.0,0,0,250655,26.0,,S
429,0,3,"Flynn, Mr. James",male,29.69911764705882,0,0,364851,7.75,,Q
430,1,3,"Pickard, Mr. Berk (Berk Trembisky)",male,32.0,0,0,SOTON/O.Q. 392078,8.05,E10,S
431,1,1,"Bjornstrom-Steffansson, Mr. Mauritz Hakan",male,28.0,0,0,110564,26.55,C52,S
432,1,3,"Thorneycroft, Mrs. Percival (Florence Kate White)",female,29.69911764705882,1,0,376564,16.1,,S
433,1,2,"Louch, Mrs. Charles Alexander (Alice Adelaide Slow)",female,42.0,1,0,SC/AH 3085,26.0,,S
434,0,3,"Kallio, Mr. Nikolai Erland",male,17.0,0,0,STON/O 2. 3101274,7.125,,S
435,0,1,"Silvey, Mr. William Baird",male,50.0,1,0,13507,55.9,E44,S
436,1,1,"Carter, Miss. Lucile Polk",female,14.0,1,2,113760,120.0,B96 B98,S
437,0,3,"Ford, Miss. Doolina Margaret ""Daisy""",female,21.0,2,2,W./C. 6608,34.375,,S
438,1,2,"Richards, Mrs. Sidney (Emily Hocking)",female,24.0,2,3,29106,18.75,,S
439,0,1,"Fortune, Mr. Mark",male,64.0,1,4,19950,263.0,C23 C25 C27,S
440,0,2,"Kvillner, Mr. Johan Henrik Johannesson",male,31.0,0,0,C.A. 18723,10.5,,S
441,1,2,"Hart, Mrs. Benjamin (Esther Ada Bloomfield)",female,45.0,1,1,F.C.C. 13529,26.25,,S
442,0,3,"Hampe, Mr. Leon",male,20.0,0,0,345769,9.5,,S
443,0,3,"Petterson, Mr. Johan Emil",male,25.0,1,0,347076,7.775,,S
444,1,2,"Reynaldo, Ms. Encarnacion",female,28.0,0,0,230434,13.0,,S
445,1,3,"Johannesen-Bratthammer, Mr. Bernt",male,29.69911764705882,0,0,65306,8.1125,,S
446,1,1,"Dodge, Master. Washington",male,4.0,0,2,33638,81.8583,A34,S
447,1,2,"Mellinger, Miss. Madeleine Violet",female,13.0,0,1,250644,19.5,,S
448,1,1,"Seward, Mr. Frederic Kimber",male,34.0,0,0,113794,26.55,,S
449,1,3,"Baclini, Miss. Marie Catherine",female,5.0,2,1,2666,19.2583,,C
450,1,1,"Peuchen, Major. Arthur Godfrey",male,52.0,0,0,113786,30.5,C104,S
451,0,2,"West, Mr. Edwy Arthur",male,36.0,1,2,C.A. 34651,27.75,,S
452,0,3,"Hagland, Mr. Ingvald Olai Olsen",male,29.69911764705882,1,0,65303,19.9667,,S
453,0,1,"Foreman, Mr. Benjamin Laventall",male,30.0,0,0,113051,27.75,C111,C
454,1,1,"Goldenberg, Mr. Samuel L",male,49.0,1,0,17453,89.1042,C92,C
455,0,3,"Peduzzi, Mr. Joseph",male,29.69911764705882,0,0,A/5 2817,8.05,,S
456,1,3,"Jalsevac, Mr. Ivan",male,29.0,0,0,349240,7.8958,,C
457,0,1,"Millet, Mr. Francis Davis",male,65.0,0,0,13509,26.55,E38,S
458,1,1,"Kenyon, Mrs. Frederick R (Marion)",female,29.69911764705882,1,0,17464,51.8625,D21,S
459,1,2,"Toomey, Miss. Ellen",female,50.0,0,0,F.C.C. 13531,10.5,,S
460,0,3,"O'Connor, Mr. Maurice",male,29.69911764705882,0,0,371060,7.75,,Q
461,1,1,"Anderson, Mr. Harry",male,48.0,0,0,19952,26.55,E12,S
462,0,3,"Morley, Mr. William",male,34.0,0,0,364506,8.05,,S
463,0,1,"Gee, Mr. Arthur H",male,47.0,0,0,111320,38.5,E63,S
464,0,2,"Milling, Mr. Jacob Christian",male,48.0,0,0,234360,13.0,,S
465,0,3,"Maisner, Mr. Simon",male,29.69911764705882,0,0,A/S 2816,8.05,,S
466,0,3,"Goncalves, Mr. Manuel Estanslas",male,38.0,0,0,SOTON/O.Q. 3101306,7.05,,S
467,0,2,"Campbell, Mr. William",male,29.69911764705882,0,0,239853,0.0,,S
468,0,1,"Smart, Mr. John Montgomery",male,56.0,0,0,113792,26.55,,S
469,0,3,"Scanlan, Mr. James",male,29.69911764705882,0,0,36209,7.725,,Q
470,1,3,"Baclini, Miss. Helene Barbara",female,0.75,2,1,2666,19.2583,,C
471,0,3,"Keefe, Mr. Arthur",male,29.69911764705882,0,0,323592,7.25,,S
472,0,3,"Cacic, Mr. Luka",male,38.0,0,0,315089,8.6625,,S
473,1,2,"West, Mrs. Edwy Arthur (Ada Mary Worth)",female,33.0,1,2,C.A. 34651,27.75,,S
474,1,2,"Jerwan, Mrs. Amin S (Marie Marthe Thuillard)",female,23.0,0,0,SC/AH Basle 541,13.7917,D,C
475,0,3,"Strandberg, Miss. Ida Sofia",female,22.0,0,0,7553,9.8375,,S
476,0,1,"Clifford, Mr. George Quincy",male,29.69911764705882,0,0,110465,52.0,A14,S
477,0,2,"Renouf, Mr. Peter Henry",male,34.0,1,0,31027,21.0,,S
478,0,3,"Braund, Mr. Lewis Richard",male,29.0,1,0,3460,7.0458,,S
479,0,3,"Karlsson, Mr. Nils August",male,22.0,0,0,350060,7.5208,,S
480,1,3,"Hirvonen, Miss. Hildur E",female,2.0,0,1,3101298,12.2875,,S
481,0,3,"Goodwin, Master. Harold Victor",male,9.0,5,2,CA 2144,46.9,,S
482,0,2,"Frost, Mr. Anthony Wood ""Archie""",male,29.69911764705882,0,0,239854,0.0,,S
483,0,3,"Rouse, Mr. Richard Henry",male,50.0,0,0,A/5 3594,8.05,,S
484,1,3,"Turkula, Mrs. (Hedwig)",female,63.0,0,0,4134,9.5875,,S
485,1,1,"Bishop, Mr. Dickinson H",male,25.0,1,0,11967,91.0792,B49,C
486,0,3,"Lefebre, Miss. Jeannie",female,29.69911764705882,3,1,4133,25.4667,,S
487,1,1,"Hoyt, Mrs. Frederick Maxfield (Jane Anne Forby)",female,35.0,1,0,19943,90.0,C93,S
488,0,1,"Kent, Mr. Edward Austin",male,58.0,0,0,11771,29.7,B37,C
489,0,3,"Somerton, Mr. Francis William",male,30.0,0,0,A.5. 18509,8.05,,S
490,1,3,"Coutts, Master. Eden Leslie ""Neville""",male,9.0,1,1,C.A. 37671,15.9,,S
491,0,3,"Hagland, Mr. Konrad Mathias Reiersen",male,29.69911764705882,1,0,65304,19.9667,,S
492,0,3,"Windelov, Mr. Einar",male,21.0,0,0,SOTON/OQ 3101317,7.25,,S
493,0,1,"Molson, Mr. Harry Markland",male,55.0,0,0,113787,30.5,C30,S
494,0,1,"Artagaveytia, Mr. Ramon",male,71.0,0,0,PC 17609,49.5042,,C
495,0,3,"Stanley, Mr. Edward Roland",male,21.0,0,0,A/4 45380,8.05,,S
496,0,3,"Yousseff, Mr. Gerious",male,29.69911764705882,0,0,2627,14.4583,,C
497,1,1,"Eustis, Miss. Elizabeth Mussey",female,54.0,1,0,36947,78.2667,D20,C
498,0,3,"Shellard, Mr. Frederick William",male,29.69911764705882,0,0,C.A. 6212,15.1,,S
499,0,1,"Allison, Mrs. Hudson J C (Bessie Waldo Daniels)",female,25.0,1,2,113781,151.55,C22 C26,S
500,0,3,"Svensson, Mr. Olof",male,24.0,0,0,350035,7.7958,,S
501,0,3,"Calic, Mr. Petar",male,17.0,0,0,315086,8.6625,,S
502,0,3,"Canavan, Miss. Mary",female,21.0,0,0,364846,7.75,,Q
503,0,3,"O'Sullivan, Miss. Bridget Mary",female,29.69911764705882,0,0,330909,7.6292,,Q
504,0,3,"Laitinen, Miss. Kristina Sofia",female,37.0,0,0,4135,9.5875,,S
505,1,1,"Maioni, Miss. Roberta",female,16.0,0,0,110152,86.5,B79,S
506,0,1,"Penasco y Castellana, Mr. Victor de Satode",male,18.0,1,0,PC 17758,108.9,C65,C
507,1,2,"Quick, Mrs. Frederick Charles (Jane Richards)",female,33.0,0,2,26360,26.0,,S
508,1,1,"Bradley, Mr. George (""George Arthur Brayton"")",male,29.69911764705882,0,0,111427,26.55,,S
509,0,3,"Olsen, Mr. Henry Margido",male,28.0,0,0,C 4001,22.525,,S
510,1,3,"Lang, Mr. Fang",male,26.0,0,0,1601,56.4958,,S
511,1,3,"Daly, Mr. Eugene Patrick",male,29.0,0,0,382651,7.75,,Q
512,0,3,"Webber, Mr. James",male,29.69911764705882,0,0,SOTON/OQ 3101316,8.05,,S
513,1,1,"McGough, Mr. James Robert",male,36.0,0,0,PC 17473,26.2875,E25,S
514,1,1,"Rothschild, Mrs. Martin (Elizabeth L. Barrett)",female,54.0,1,0,PC 17603,59.4,,C
515,0,3,"Coleff, Mr. Satio",male,24.0,0,0,349209,7.4958,,S
516,0,1,"Walker, Mr. William Anderson",male,47.0,0,0,36967,34.0208,D46,S
517,1,2,"Lemore, Mrs. (Amelia Milley)",female,34.0,0,0,C.A. 34260,10.5,F33,S
518,0,3,"Ryan, Mr. Patrick",male,29.69911764705882,0,0,371110,24.15,,Q
519,1,2,"Angle, Mrs. William A (Florence ""Mary"" Agnes Hughes)",female,36.0,1,0,226875,26.0,,S
520,0,3,"Pavlovic, Mr. Stefo",male,32.0,0,0,349242,7.8958,,S
521,1,1,"Perreault, Miss. Anne",female,30.0,0,0,12749,93.5,B73,S
522,0,3,"Vovk, Mr. Janko",male,22.0,0,0,349252,7.8958,,S
523,0,3,"Lahoud, Mr. Sarkis",male,29.69911764705882,0,0,2624,7.225,,C
524,1,1,"Hippach, Mrs. Louis Albert (Ida Sophia Fischer)",female,44.0,0,1,111361,57.9792,B18,C
525,0,3,"Kassem, Mr. Fared",male,29.69911764705882,0,0,2700,7.2292,,C
526,0,3,"Farrell, Mr. James",male,40.5,0,0,367232,7.75,,Q
527,1,2,"Ridsdale, Miss. Lucy",female,50.0,0,0,W./C. 14258,10.5,,S
528,0,1,"Farthing, Mr. John",male,29.69911764705882,0,0,PC 17483,221.7792,C95,S
529,0,3,"Salonen, Mr. Johan Werner",male,39.0,0,0,3101296,7.925,,S
530,0,2,"Hocking, Mr. Richard George",male,23.0,2,1,29104,11.5,,S
531,1,2,"Quick, Miss. Phyllis May",female,2.0,1,1,26360,26.0,,S
532,0,3,"Toufik, Mr. Nakli",male,29.69911764705882,0,0,2641,7.2292,,C
533,0,3,"Elias, Mr. Joseph Jr",male,17.0,1,1,2690,7.2292,,C
534,1,3,"Peter, Mrs. Catherine (Catherine Rizk)",female,29.69911764705882,0,2,2668,22.3583,,C
535,0,3,"Cacic, Miss. Marija",female,30.0,0,0,315084,8.6625,,S
536,1,2,"Hart, Miss. Eva Miriam",female,7.0,0,2,F.C.C. 13529,26.25,,S
537,0,1,"Butt, Major. Archibald Willingham",male,45.0,0,0,113050,26.55,B38,S
538,1,1,"LeRoy, Miss. Bertha",female,30.0,0,0,PC 17761,106.425,,C
539,0,3,"Risien, Mr. Samuel Beard",male,29.69911764705882,0,0,364498,14.5,,S
540,1,1,"Frolicher, Miss. Hedwig Margaritha",female,22.0,0,2,13568,49.5,B39,C
541,1,1,"Crosby, Miss. Harriet R",female,36.0,0,2,WE/P 5735,71.0,B22,S
542,0,3,"Andersson, Miss. Ingeborg Constanzia",female,9.0,4,2,347082,31.275,,S
543,0,3,"Andersson, Miss. Sigrid Elisabeth",female,11.0,4,2,347082,31.275,,S
544,1,2,"Beane, Mr. Edward",male,32.0,1,0,2908,26.0,,S
545,0,1,"Douglas, Mr. Walter Donald",male,50.0,1,0,PC 17761,106.425,C86,C
546,0,1,"Nicholson, Mr. Arthur Ernest",male,64.0,0,0,693,26.0,,S
547,1,2,"Beane, Mrs. Edward (Ethel Clarke)",female,19.0,1,0,2908,26.0,,S
548,1,2,"Padro y Manent, Mr. Julian",male,29.69911764705882,0,0,SC/PARIS 2146,13.8625,,C
549,0,3,"Goldsmith, Mr. Frank John",male,33.0,1,1,363291,20.525,,S
550,1,2,"Davies, Master. John Morgan Jr",male,8.0,1,1,C.A. 33112,36.75,,S
551,1,1,"Thayer, Mr. John Borland Jr",male,17.0,0,2,17421,110.8833,C70,C
552,0,2,"Sharp, Mr. Percival James R",male,27.0,0,0,244358,26.0,,S
553,0,3,"O'Brien, Mr. Timothy",male,29.69911764705882,0,0,330979,7.8292,,Q
554,1,3,"Leeni, Mr. Fahim (""Philip Zenni"")",male,22.0,0,0,2620,7.225,,C
555,1,3,"Ohman, Miss. Velin",female,22.0,0,0,347085,7.775,,S
556,0,1,"Wright, Mr. George",male,62.0,0,0,113807,26.55,,S
557,1,1,"Duff Gordon, Lady. (Lucille Christiana Sutherland) (""Mrs Morgan"")",female,48.0,1,0,11755,39.6,A16,C
558,0,1,"Robbins, Mr. Victor",male,29.69911764705882,0,0,PC 17757,227.525,,C
559,1,1,"Taussig, Mrs. Emil (Tillie Mandelbaum)",female,39.0,1,1,110413,79.65,E67,S
560,1,3,"de Messemaeker, Mrs. Guillaume Joseph (Emma)",female,36.0,1,0,345572,17.4,,S
561,0,3,"Morrow, Mr. Thomas Rowan",male,29.69911764705882,0,0,372622,7.75,,Q
562,0,3,"Sivic, Mr. Husein",male,40.0,0,0,349251,7.8958,,S
563,0,2,"Norman, Mr. Robert Douglas",male,28.0,0,0,218629,13.5,,S
564,0,3,"Simmons, Mr. John",male,29.69911764705882,0,0,SOTON/OQ 392082,8.05,,S
565,0,3,"Meanwell, Miss. (Marion Ogden)",female,29.69911764705882,0,0,SOTON/O.Q. 392087,8.05,,S
566,0,3,"Davies, Mr. Alfred J",male,24.0,2,0,A/4 48871,24.15,,S
567,0,3,"Stoytcheff, Mr. Ilia",male,19.0,0,0,349205,7.8958,,S
568,0,3,"Palsson, Mrs. Nils (Alma Cornelia Berglund)",female,29.0,0,4,349909,21.075,,S
569,0,3,"Doharr, Mr. Tannous",male,29.69911764705882,0,0,2686,7.2292,,C
570,1,3,"Jonsson, Mr. Carl",male,32.0,0,0,350417,7.8542,,S
571,1,2,"Harris, Mr. George",male,62.0,0,0,S.W./PP 752,10.5,,S
572,1,1,"Appleton, Mrs. Edward Dale (Charlotte Lamson)",female,53.0,2,0,11769,51.4792,C101,S
573,1,1,"Flynn, Mr. John Irwin (""Irving"")",male,36.0,0,0,PC 17474,26.3875,E25,S
574,1,3,"Kelly, Miss. Mary",female,29.69911764705882,0,0,14312,7.75,,Q
575,0,3,"Rush, Mr. Alfred George John",male,16.0,0,0,A/4. 20589,8.05,,S
576,0,3,"Patchett, Mr. George",male,19.0,0,0,358585,14.5,,S
577,1,2,"Garside, Miss. Ethel",female,34.0,0,0,243880,13.0,,S
578,1,1,"Silvey, Mrs. William Baird (Alice Munger)",female,39.0,1,0,13507,55.9,E44,S
579,0,3,"Caram, Mrs. Joseph (Maria Elias)",female,29.69911764705882,1,0,2689,14.4583,,C
580,1,3,"Jussila, Mr. Eiriik",male,32.0,0,0,STON/O 2. 3101286,7.925,,S
581,1,2,"Christy, Miss. Julie Rachel",female,25.0,1,1,237789,30.0,,S
582,1,1,"Thayer, Mrs. John Borland (Marian Longstreth Morris)",female,39.0,1,1,17421,110.8833,C68,C
583,0,2,"Downton, Mr. William James",male,54.0,0,0,28403,26.0,,S
584,0,1,"Ross, Mr. John Hugo",male,36.0,0,0,13049,40.125,A10,C
585,0,3,"Paulner, Mr. Uscher",male,29.69911764705882,0,0,3411,8.7125,,C
586,1,1,"Taussig, Miss. Ruth",female,18.0,0,2,110413,79.65,E68,S
587,0,2,"Jarvis, Mr. John Denzil",male,47.0,0,0,237565,15.0,,S
588,1,1,"Frolicher-Stehli, Mr. Maxmillian",male,60.0,1,1,13567,79.2,B41,C
589,0,3,"Gilinski, Mr. Eliezer",male,22.0,0,0,14973,8.05,,S
590,0,3,"Murdlin, Mr. Joseph",male,29.69911764705882,0,0,A./5. 3235,8.05,,S
591,0,3,"Rintamaki, Mr. Matti",male,35.0,0,0,STON/O 2. 3101273,7.125,,S
592,1,1,"Stephenson, Mrs. Walter Bertram (Martha Eustis)",female,52.0,1,0,36947,78.2667,D20,C
593,0,3,"Elsbury, Mr. William James",male,47.0,0,0,A/5 3902,7.25,,S
594,0,3,"Bourke, Miss. Mary",female,29.69911764705882,0,2,364848,7.75,,Q
595,0,2,"Chapman, Mr. John Henry",male,37.0,1,0,SC/AH 29037,26.0,,S
596,0,3,"Van Impe, Mr. Jean Baptiste",male,36.0,1,1,345773,24.15,,S
597,1,2,"Leitch, Miss. Jessie Wills",female,29.69911764705882,0,0,248727,33.0,,S
598,0,3,"Johnson, Mr. Alfred",male,49.0,0,0,LINE,0.0,,S
599,0,3,"Boulos, Mr. Hanna",male,29.69911764705882,0,0,2664,7.225,,C
600,1,1,"Duff Gordon, Sir. Cosmo Edmund (""Mr Morgan"")",male,49.0,1,0,PC 17485,56.9292,A20,C
601,1,2,"Jacobsohn, Mrs. Sidney Samuel (Amy Frances Christy)",female,24.0,2,1,243847,27.0,,S
602,0,3,"Slabenoff, Mr. Petco",male,29.69911764705882,0,0,349214,7.8958,,S
603,0,1,"Harrington, Mr. Charles H",male,29.69911764705882,0,0,113796,42.4,,S
604,0,3,"Torber, Mr. Ernst William",male,44.0,0,0,364511,8.05,,S
605,1,1,"Homer, Mr. Harry (""Mr E Haven"")",male,35.0,0,0,111426,26.55,,C
606,0,3,"Lindell, Mr. Edvard Bengtsson",male,36.0,1,0,349910,15.55,,S
607,0,3,"Karaic, Mr. Milan",male,30.0,0,0,349246,7.8958,,S
608,1,1,"Daniel, Mr. Robert Williams",male,27.0,0,0,113804,30.5,,S
609,1,2,"Laroche, Mrs. Joseph (Juliette Marie Louise Lafargue)",female,22.0,1,2,SC/Paris 2123,41.5792,,C
610,1,1,"Shutes, Miss. Elizabeth W",female,40.0,0,0,PC 17582,153.4625,C125,S
611,0,3,"Andersson, Mrs. Anders Johan (Alfrida Konstantia Brogren)",female,39.0,1,5,347082,31.275,,S
612,0,3,"Jardin, Mr. Jose Neto",male,29.69911764705882,0,0,SOTON/O.Q. 3101305,7.05,,S
613,1,3,"Murphy, Miss. Margaret Jane",female,29.69911764705882,1,0,367230,15.5,,Q
614,0,3,"Horgan, Mr. John",male,29.69911764705882,0,0,370377,7.75,,Q
615,0,3,"Brocklebank, Mr. William Alfred",male,35.0,0,0,364512,8.05,,S
616,1,2,"Herman, Miss. Alice",female,24.0,1,2,220845,65.0,,S
617,0,3,"Danbom, Mr. Ernst Gilbert",male,34.0,1,1,347080,14.4,,S
618,0,3,"Lobb, Mrs. William Arthur (Cordelia K Stanlick)",female,26.0,1,0,A/5. 3336,16.1,,S
619,1,2,"Becker, Miss. Marion Louise",female,4.0,2,1,230136,39.0,F4,S
620,0,2,"Gavey, Mr. Lawrence",male,26.0,0,0,31028,10.5,,S
621,0,3,"Yasbeck, Mr. Antoni",male,27.0,1,0,2659,14.4542,,C
622,1,1,"Kimball, Mr. Edwin Nelson Jr",male,42.0,1,0,11753,52.5542,D19,S
623,1,3,"Nakid, Mr. Sahid",male,20.0,1,1,2653,15.7417,,C
624,0,3,"Hansen, Mr. Henry Damsgaard",male,21.0,0,0,350029,7.8542,,S
625,0,3,"Bowen, Mr. David John ""Dai""",male,21.0,0,0,54636,16.1,,S
626,0,1,"Sutton, Mr. Frederick",male,61.0,0,0,36963,32.3208,D50,S
627,0,2,"Kirkland, Rev. Charles Leonard",male,57.0,0,0,219533,12.35,,Q
628,1,1,"Longley, Miss. Gretchen Fiske",female,21.0,0,0,13502,77.9583,D9,S
629,0,3,"Bostandyeff, Mr. Guentcho",male,26.0,0,0,349224,7.8958,,S
630,0,3,"O'Connell, Mr. Patrick D",male,29.69911764705882,0,0,334912,7.7333,,Q
631,1,1,"Barkworth, Mr. Algernon Henry Wilson",male,80.0,0,0,27042,30.0,A23,S
632,0,3,"Lundahl, Mr. Johan Svensson",male,51.0,0,0,347743,7.0542,,S
633,1,1,"Stahelin-Maeglin, Dr. Max",male,32.0,0,0,13214,30.5,B50,C
634,0,1,"Parr, Mr. William Henry Marsh",male,29.69911764705882,0,0,112052,0.0,,S
635,0,3,"Skoog, Miss. Mabel",female,9.0,3,2,347088,27.9,,S
636,1,2,"Davis, Miss. Mary",female,28.0,0,0,237668,13.0,,S
637,0,3,"Leinonen, Mr. Antti Gustaf",male,32.0,0,0,STON/O 2. 3101292,7.925,,S
638,0,2,"Collyer, Mr. Harvey",male,31.0,1,1,C.A. 31921,26.25,,S
639,0,3,"Panula, Mrs. Juha (Maria Emilia Ojala)",female,41.0,0,5,3101295,39.6875,,S
640,0,3,"Thorneycroft, Mr. Percival",male,29.69911764705882,1,0,376564,16.1,,S
641,0,3,"Jensen, Mr. Hans Peder",male,20.0,0,0,350050,7.8542,,S
642,1,1,"Sagesser, Mlle. Emma",female,24.0,0,0,PC 17477,69.3,B35,C
643,0,3,"Skoog, Miss. Margit Elizabeth",female,2.0,3,2,347088,27.9,,S
644,1,3,"Foo, Mr. Choong",male,29.69911764705882,0,0,1601,56.4958,,S
645,1,3,"Baclini, Miss. Eugenie",female,0.75,2,1,2666,19.2583,,C
646,1,1,"Harper, Mr. Henry Sleeper",male,48.0,1,0,PC 17572,76.7292,D33,C
647,0,3,"Cor, Mr. Liudevit",male,19.0,0,0,349231,7.8958,,S
648,1,1,"Simonius-Blumer, Col. Oberst Alfons",male,56.0,0,0,13213,35.5,A26,C
649,0,3,"Willey, Mr. Edward",male,29.69911764705882,0,0,S.O./P.P. 751,7.55,,S
650,1,3,"Stanley, Miss. Amy Zillah Elsie",female,23.0,0,0,CA. 2314,7.55,,S
651,0,3,"Mitkoff, Mr. Mito",male,29.69911764705882,0,0,349221,7.8958,,S
652,1,2,"Doling, Miss. Elsie",female,18.0,0,1,231919,23.0,,S
653,0,3,"Kalvik, Mr. Johannes Halvorsen",male,21.0,0,0,8475,8.4333,,S
654,1,3,"O'Leary, Miss. Hanora ""Norah""",female,29.69911764705882,0,0,330919,7.8292,,Q
655,0,3,"Hegarty, Miss. Hanora ""Nora""",female,18.0,0,0,365226,6.75,,Q
656,0,2,"Hickman, Mr. Leonard Mark",male,24.0,2,0,S.O.C. 14879,73.5,,S
657,0,3,"Radeff, Mr. Alexander",male,29.69911764705882,0,0,349223,7.8958,,S
658,0,3,"Bourke, Mrs. John (Catherine)",female,32.0,1,1,364849,15.5,,Q
659,0,2,"Eitemiller, Mr. George Floyd",male,23.0,0,0,29751,13.0,,S
660,0,1,"Newell, Mr. Arthur Webster",male,58.0,0,2,35273,113.275,D48,C
661,1,1,"Frauenthal, Dr. Henry William",male,50.0,2,0,PC 17611,133.65,,S
662,0,3,"Badt, Mr. Mohamed",male,40.0,0,0,2623,7.225,,C
663,0,1,"Colley, Mr. Edward Pomeroy",male,47.0,0,0,5727,25.5875,E58,S
664,0,3,"Coleff, Mr. Peju",male,36.0,0,0,349210,7.4958,,S
665,1,3,"Lindqvist, Mr. Eino William",male,20.0,1,0,STON/O 2. 3101285,7.925,,S
666,0,2,"Hickman, Mr. Lewis",male,32.0,2,0,S.O.C. 14879,73.5,,S
667,0,2,"Butler, Mr. Reginald Fenton",male,25.0,0,0,234686,13.0,,S
668,0,3,"Rommetvedt, Mr. Knud Paust",male,29.69911764705882,0,0,312993,7.775,,S
669,0,3,"Cook, Mr. Jacob",male,43.0,0,0,A/5 3536,8.05,,S
670,1,1,"Taylor, Mrs. Elmer Zebley (Juliet Cummins Wright)",female,29.69911764705882,1,0,19996,52.0,C126,S
671,1,2,"Brown, Mrs. Thomas William Solomon (Elizabeth Catherine Ford)",female,40.0,1,1,29750,39.0,,S
672,0,1,"Davidson, Mr. Thornton",male,31.0,1,0,F.C. 12750,52.0,B71,S
673,0,2,"Mitchell, Mr. Henry Michael",male,70.0,0,0,C.A. 24580,10.5,,S
674,1,2,"Wilhelms, Mr. Charles",male,31.0,0,0,244270,13.0,,S
675,0,2,"Watson, Mr. Ennis Hastings",male,29.69911764705882,0,0,239856,0.0,,S
676,0,3,"Edvardsson, Mr. Gustaf Hjalmar",male,18.0,0,0,349912,7.775,,S
677,0,3,"Sawyer, Mr. Frederick Charles",male,24.5,0,0,342826,8.05,,S
678,1,3,"Turja, Miss. Anna Sofia",female,18.0,0,0,4138,9.8417,,S
679,0,3,"Goodwin, Mrs. Frederick (Augusta Tyler)",female,43.0,1,6,CA 2144,46.9,,S
680,1,1,"Cardeza, Mr. Thomas Drake Martinez",male,36.0,0,1,PC 17755,512.3292,B51 B53 B55,C
681,0,3,"Peters, Miss. Katie",female,29.69911764705882,0,0,330935,8.1375,,Q
682,1,1,"Hassab, Mr. Hammad",male,27.0,0,0,PC 17572,76.7292,D49,C
683,0,3,"Olsvigen, Mr. Thor Anderson",male,20.0,0,0,6563,9.225,,S
684,0,3,"Goodwin, Mr. Charles Edward",male,14.0,5,2,CA 2144,46.9,,S
685,0,2,"Brown, Mr. Thomas William Solomon",male,60.0,1,1,29750,39.0,,S
686,0,2,"Laroche, Mr. Joseph Philippe Lemercier",male,25.0,1,2,SC/Paris 2123,41.5792,,C
687,0,3,"Panula, Mr. Jaako Arnold",male,14.0,4,1,3101295,39.6875,,S
688,0,3,"Dakic, Mr. Branko",male,19.0,0,0,349228,10.1708,,S
689,0,3,"Fischer, Mr. Eberhard Thelander",male,18.0,0,0,350036,7.7958,,S
690,1,1,"Madill, Miss. Georgette Alexandra",female,15.0,0,1,24160,211.3375,B5,S
691,1,1,"Dick, Mr. Albert Adrian",male,31.0,1,0,17474,57.0,B20,S
692,1,3,"Karun, Miss. Manca",female,4.0,0,1,349256,13.4167,,C
693,1,3,"Lam, Mr. Ali",male,29.69911764705882,0,0,1601,56.4958,,S
694,0,3,"Saad, Mr. Khalil",male,25.0,0,0,2672,7.225,,C
695,0,1,"Weir, Col. John",male,60.0,0,0,113800,26.55,,S
696,0,2,"Chapman, Mr. Charles Henry",male,52.0,0,0,248731,13.5,,S
697,0,3,"Kelly, Mr. James",male,44.0,0,0,363592,8.05,,S
698,1,3,"Mullens, Miss. Katherine ""Katie""",female,29.69911764705882,0,0,35852,7.7333,,Q
699,0,1,"Thayer, Mr. John Borland",male,49.0,1,1,17421,110.8833,C68,C
700,0,3,"Humblen, Mr. Adolf Mathias Nicolai Olsen",male,42.0,0,0,348121,7.65,F G63,S
701,1,1,"Astor, Mrs. John Jacob (Madeleine Talmadge Force)",female,18.0,1,0,PC 17757,227.525,C62 C64,C
702,1,1,"Silverthorne, Mr. Spencer Victor",male,35.0,0,0,PC 17475,26.2875,E24,S
703,0,3,"Barbara, Miss. Saiide",female,18.0,0,1,2691,14.4542,,C
704,0,3,"Gallagher, Mr. Martin",male,25.0,0,0,36864,7.7417,,Q
705,0,3,"Hansen, Mr. Henrik Juul",male,26.0,1,0,350025,7.8542,,S
706,0,2,"Morley, Mr. Henry Samuel (""Mr Henry Marshall"")",male,39.0,0,0,250655,26.0,,S
707,1,2,"Kelly, Mrs. Florence ""Fannie""",female,45.0,0,0,223596,13.5,,S
708,1,1,"Calderhead, Mr. Edward Pennington",male,42.0,0,0,PC 17476,26.2875,E24,S
709,1,1,"Cleaver, Miss. Alice",female,22.0,0,0,113781,151.55,,S
710,1,3,"Moubarek, Master. Halim Gonios (""William George"")",male,29.69911764705882,1,1,2661,15.2458,,C
711,1,1,"Mayne, Mlle. Berthe Antonine (""Mrs de Villiers"")",female,24.0,0,0,PC 17482,49.5042,C90,C
712,0,1,"Klaber, Mr. Herman",male,29.69911764705882,0,0,113028,26.55,C124,S
713,1,1,"Taylor, Mr. Elmer Zebley",male,48.0,1,0,19996,52.0,C126,S
714,0,3,"Larsson, Mr. August Viktor",male,29.0,0,0,7545,9.4833,,S
715,0,2,"Greenberg, Mr. Samuel",male,52.0,0,0,250647,13.0,,S
716,0,3,"Soholt, Mr. Peter Andreas Lauritz Andersen",male,19.0,0,0,348124,7.65,F G73,S
717,1,1,"Endres, Miss. Caroline Louise",female,38.0,0,0,PC 17757,227.525,C45,C
718,1,2,"Troutt, Miss. Edwina Celia ""Winnie""",female,27.0,0,0,34218,10.5,E101,S
719,0,3,"McEvoy, Mr. Michael",male,29.69911764705882,0,0,36568,15.5,,Q
720,0,3,"Johnson, Mr. Malkolm Joackim",male,33.0,0,0,347062,7.775,,S
721,1,2,"Harper, Miss. Annie Jessie ""Nina""",female,6.0,0,1,248727,33.0,,S
722,0,3,"Jensen, Mr. Svend Lauritz",male,17.0,1,0,350048,7.0542,,S
723,0,2,"Gillespie, Mr. William Henry",male,34.0,0,0,12233,13.0,,S
724,0,2,"Hodges, Mr. Henry Price",male,50.0,0,0,250643,13.0,,S
725,1,1,"Chambers, Mr. Norman Campbell",male,27.0,1,0,113806,53.1,E8,S
726,0,3,"Oreskovic, Mr. Luka",male,20.0,0,0,315094,8.6625,,S
727,1,2,"Renouf, Mrs. Peter Henry (Lillian Jefferys)",female,30.0,3,0,31027,21.0,,S
728,1,3,"Mannion, Miss. Margareth",female,29.69911764705882,0,0,36866,7.7375,,Q
729,0,2,"Bryhl, Mr. Kurt Arnold Gottfrid",male,25.0,1,0,236853,26.0,,S
730,0,3,"Ilmakangas, Miss. Pieta Sofia",female,25.0,1,0,STON/O2. 3101271,7.925,,S
731,1,1,"Allen, Miss. Elisabeth Walton",female,29.0,0,0,24160,211.3375,B5,S
732,0,3,"Hassan, Mr. Houssein G N",male,11.0,0,0,2699,18.7875,,C
733,0,2,"Knight, Mr. Robert J",male,29.69911764705882,0,0,239855,0.0,,S
734,0,2,"Berriman, Mr. William John",male,23.0,0,0,28425,13.0,,S
735,0,2,"Troupiansky, Mr. Moses Aaron",male,23.0,0,0,233639,13.0,,S
736,0,3,"Williams, Mr. Leslie",male,28.5,0,0,54636,16.1,,S
737,0,3,"Ford, Mrs. Edward (Margaret Ann Watson)",female,48.0,1,3,W./C. 6608,34.375,,S
738,1,1,"Lesurer, Mr. Gustave J",male,35.0,0,0,PC 17755,512.3292,B101,C
739,0,3,"Ivanoff, Mr. Kanio",male,29.69911764705882,0,0,349201,7.8958,,S
740,0,3,"Nankoff, Mr. Minko",male,29.69911764705882,0,0,349218,7.8958,,S
741,1,1,"Hawksford, Mr. Walter James",male,29.69911764705882,0,0,16988,30.0,D45,S
742,0,1,"Cavendish, Mr. Tyrell William",male,36.0,1,0,19877,78.85,C46,S
743,1,1,"Ryerson, Miss. Susan Parker ""Suzette""",female,21.0,2,2,PC 17608,262.375,B57 B59 B63 B66,C
744,0,3,"McNamee, Mr. Neal",male,24.0,1,0,376566,16.1,,S
745,1,3,"Stranden, Mr. Juho",male,31.0,0,0,STON/O 2. 3101288,7.925,,S
746,0,1,"Crosby, Capt. Edward Gifford",male,70.0,1,1,WE/P 5735,71.0,B22,S
747,0,3,"Abbott, Mr. Rossmore Edward",male,16.0,1,1,C.A. 2673,20.25,,S
748,1,2,"Sinkkonen, Miss. Anna",female,30.0,0,0,250648,13.0,,S
749,0,1,"Marvin, Mr. Daniel Warner",male,19.0,1,0,113773,53.1,D30,S
750,0,3,"Connaghton, Mr. Michael",male,31.0,0,0,335097,7.75,,Q
751,1,2,"Wells, Miss. Joan",female,4.0,1,1,29103,23.0,,S
752,1,3,"Moor, Master. Meier",male,6.0,0,1,392096,12.475,E121,S
753,0,3,"Vande Velde, Mr. Johannes Joseph",male,33.0,0,0,345780,9.5,,S
754,0,3,"Jonkoff, Mr. Lalio",male,23.0,0,0,349204,7.8958,,S
755,1,2,"Herman, Mrs. Samuel (Jane Laver)",female,48.0,1,2,220845,65.0,,S
756,1,2,"Hamalainen, Master. Viljo",male,0.67,1,1,250649,14.5,,S
757,0,3,"Carlsson, Mr. August Sigfrid",male,28.0,0,0,350042,7.7958,,S
758,0,2,"Bailey, Mr. Percy Andrew",male,18.0,0,0,29108,11.5,,S
759,0,3,"Theobald, Mr. Thomas Leonard",male,34.0,0,0,363294,8.05,,S
760,1,1,"Rothes, the Countess. of (Lucy Noel Martha Dyer-Edwards)",female,33.0,0,0,110152,86.5,B77,S
761,0,3,"Garfirth, Mr. John",male,29.69911764705882,0,0,358585,14.5,,S
762,0,3,"Nirva, Mr. Iisakki Antino Aijo",male,41.0,0,0,SOTON/O2 3101272,7.125,,S
763,1,3,"Barah, Mr. Hanna Assi",male,20.0,0,0,2663,7.2292,,C
764,1,1,"Carter, Mrs. William Ernest (Lucile Polk)",female,36.0,1,2,113760,120.0,B96 B98,S
765,0,3,"Eklund, Mr. Hans Linus",male,16.0,0,0,347074,7.775,,S
766,1,1,"Hogeboom, Mrs. John C (Anna Andrews)",female,51.0,1,0,13502,77.9583,D11,S
767,0,1,"Brewe, Dr. Arthur Jackson",male,29.69911764705882,0,0,112379,39.6,,C
768,0,3,"Mangan, Miss. Mary",female,30.5,0,0,364850,7.75,,Q
769,0,3,"Moran, Mr. Daniel J",male,29.69911764705882,1,0,371110,24.15,,Q
770,0,3,"Gronnestad, Mr. Daniel Danielsen",male,32.0,0,0,8471,8.3625,,S
771,0,3,"Lievens, Mr. Rene Aime",male,24.0,0,0,345781,9.5,,S
772,0,3,"Jensen, Mr. Niels Peder",male,48.0,0,0,350047,7.8542,,S
773,0,2,"Mack, Mrs. (Mary)",female,57.0,0,0,S.O./P.P. 3,10.5,E77,S
774,0,3,"Elias, Mr. Dibo",male,29.69911764705882,0,0,2674,7.225,,C
775,1,2,"Hocking, Mrs. Elizabeth (Eliza Needs)",female,54.0,1,3,29105,23.0,,S
776,0,3,"Myhrman, Mr. Pehr Fabian Oliver Malkolm",male,18.0,0,0,347078,7.75,,S
777,0,3,"Tobin, Mr. Roger",male,29.69911764705882,0,0,383121,7.75,F38,Q
778,1,3,"Emanuel, Miss. Virginia Ethel",female,5.0,0,0,364516,12.475,,S
779,0,3,"Kilgannon, Mr. Thomas J",male,29.69911764705882,0,0,36865,7.7375,,Q
780,1,1,"Robert, Mrs. Edward Scott (Elisabeth Walton McMillan)",female,43.0,0,1,24160,211.3375,B3,S
781,1,3,"Ayoub, Miss. Banoura",female,13.0,0,0,2687,7.2292,,C
782,1,1,"Dick, Mrs. Albert Adrian (Vera Gillespie)",female,17.0,1,0,17474,57.0,B20,S
783,0,1,"Long, Mr. Milton Clyde",male,29.0,0,0,113501,30.0,D6,S
784,0,3,"Johnston, Mr. Andrew G",male,29.69911764705882,1,2,W./C. 6607,23.45,,S
785,0,3,"Ali, Mr. William",male,25.0,0,0,SOTON/O.Q. 3101312,7.05,,S
786,0,3,"Harmer, Mr. Abraham (David Lishin)",male,25.0,0,0,374887,7.25,,S
787,1,3,"Sjoblom, Miss. Anna Sofia",female,18.0,0,0,3101265,7.4958,,S
788,0,3,"Rice, Master. George Hugh",male,8.0,4,1,382652,29.125,,Q
789,1,3,"Dean, Master. Bertram Vere",male,1.0,1,2,C.A. 2315,20.575,,S
790,0,1,"Guggenheim, Mr. Benjamin",male,46.0,0,0,PC 17593,79.2,B82 B84,C
791,0,3,"Keane, Mr. Andrew ""Andy""",male,29.69911764705882,0,0,12460,7.75,,Q
792,0,2,"Gaskell, Mr. Alfred",male,16.0,0,0,239865,26.0,,S
793,0,3,"Sage, Miss. Stella Anna",female,29.69911764705882,8,2,CA. 2343,69.55,,S
794,0,1,"Hoyt, Mr. William Fisher",male,29.69911764705882,0,0,PC 17600,30.6958,,C
795,0,3,"Dantcheff, Mr. Ristiu",male,25.0,0,0,349203,7.8958,,S
796,0,2,"Otter, Mr. Richard",male,39.0,0,0,28213,13.0,,S
797,1,1,"Leader, Dr. Alice (Farnham)",female,49.0,0,0,17465,25.9292,D17,S
798,1,3,"Osman, Mrs. Mara",female,31.0,0,0,349244,8.6833,,S
799,0,3,"Ibrahim Shawah, Mr. Yousseff",male,30.0,0,0,2685,7.2292,,C
800,0,3,"Van Impe, Mrs. Jean Baptiste (Rosalie Paula Govaert)",female,30.0,1,1,345773,24.15,,S
801,0,2,"Ponesell, Mr. Martin",male,34.0,0,0,250647,13.0,,S
802,1,2,"Collyer, Mrs. Harvey (Charlotte Annie Tate)",female,31.0,1,1,C.A. 31921,26.25,,S
803,1,1,"Carter, Master. William Thornton II",male,11.0,1,2,113760,120.0,B96 B98,S
804,1,3,"Thomas, Master. Assad Alexander",male,0.42,0,1,2625,8.5167,,C
805,1,3,"Hedman, Mr. Oskar Arvid",male,27.0,0,0,347089,6.975,,S
806,0,3,"Johansson, Mr. Karl Johan",male,31.0,0,0,347063,7.775,,S
807,0,1,"Andrews, Mr. Thomas Jr",male,39.0,0,0,112050,0.0,A36,S
808,0,3,"Pettersson, Miss. Ellen Natalia",female,18.0,0,0,347087,7.775,,S
809,0,2,"Meyer, Mr. August",male,39.0,0,0,248723,13.0,,S
810,1,1,"Chambers, Mrs. Norman Campbell (Bertha Griggs)",female,33.0,1,0,113806,53.1,E8,S
811,0,3,"Alexander, Mr. William",male,26.0,0,0,3474,7.8875,,S
812,0,3,"Lester, Mr. James",male,39.0,0,0,A/4 48871,24.15,,S
813,0,2,"Slemen, Mr. Richard James",male,35.0,0,0,28206,10.5,,S
814,0,3,"Andersson, Miss. Ebba Iris Alfrida",female,6.0,4,2,347082,31.275,,S
815,0,3,"Tomlin, Mr. Ernest Portage",male,30.5,0,0,364499,8.05,,S
816,0,1,"Fry, Mr. Richard",male,29.69911764705882,0,0,112058,0.0,B102,S
817,0,3,"Heininen, Miss. Wendla Maria",female,23.0,0,0,STON/O2. 3101290,7.925,,S
818,0,2,"Mallet, Mr. Albert",male,31.0,1,1,S.C./PARIS 2079,37.0042,,C
819,0,3,"Holm, Mr. John Fredrik Alexander",male,43.0,0,0,C 7075,6.45,,S
820,0,3,"Skoog, Master. Karl Thorsten",male,10.0,3,2,347088,27.9,,S
821,1,1,"Hays, Mrs. Charles Melville (Clara Jennings Gregg)",female,52.0,1,1,12749,93.5,B69,S
822,1,3,"Lulic, Mr. Nikola",male,27.0,0,0,315098,8.6625,,S
823,0,1,"Reuchlin, Jonkheer. John George",male,38.0,0,0,19972,0.0,,S
824,1,3,"Moor, Mrs. (Beila)",female,27.0,0,1,392096,12.475,E121,S
825,0,3,"Panula, Master. Urho Abraham",male,2.0,4,1,3101295,39.6875,,S
826,0,3,"Flynn, Mr. John",male,29.69911764705882,0,0,368323,6.95,,Q
827,0,3,"Lam, Mr. Len",male,29.69911764705882,0,0,1601,56.4958,,S
828,1,2,"Mallet, Master. Andre",male,1.0,0,2,S.C./PARIS 2079,37.0042,,C
829,1,3,"McCormack, Mr. Thomas Joseph",male,29.69911764705882,0,0,367228,7.75,,Q
830,1,1,"Stone, Mrs. George Nelson (Martha Evelyn)",female,62.0,0,0,113572,80.0,B28,
831,1,3,"Yasbeck, Mrs. Antoni (Selini Alexander)",female,15.0,1,0,2659,14.4542,,C
832,1,2,"Richards, Master. George Sibley",male,0.83,1,1,29106,18.75,,S
833,0,3,"Saad, Mr. Amin",male,29.69911764705882,0,0,2671,7.2292,,C
834,0,3,"Augustsson, Mr. Albert",male,23.0,0,0,347468,7.8542,,S
835,0,3,"Allum, Mr. Owen George",male,18.0,0,0,2223,8.3,,S
836,1,1,"Compton, Miss. Sara Rebecca",female,39.0,1,1,PC 17756,83.1583,E49,C
837,0,3,"Pasic, Mr. Jakob",male,21.0,0,0,315097,8.6625,,S
838,0,3,"Sirota, Mr. Maurice",male,29.69911764705882,0,0,392092,8.05,,S
839,1,3,"Chip, Mr. Chang",male,32.0,0,0,1601,56.4958,,S
840,1,1,"Marechal, Mr. Pierre",male,29.69911764705882,0,0,11774,29.7,C47,C
841,0,3,"Alhomaki, Mr. Ilmari Rudolf",male,20.0,0,0,SOTON/O2 3101287,7.925,,S
842,0,2,"Mudd, Mr. Thomas Charles",male,16.0,0,0,S.O./P.P. 3,10.5,,S
843,1,1,"Serepeca, Miss. Augusta",female,30.0,0,0,113798,31.0,,C
844,0,3,"Lemberopolous, Mr. Peter L",male,34.5,0,0,2683,6.4375,,C
845,0,3,"Culumovic, Mr. Jeso",male,17.0,0,0,315090,8.6625,,S
846,0,3,"Abbing, Mr. Anthony",male,42.0,0,0,C.A. 5547,7.55,,S
847,0,3,"Sage, Mr. Douglas Bullen",male,29.69911764705882,8,2,CA. 2343,69.55,,S
848,0,3,"Markoff, Mr. Marin",male,35.0,0,0,349213,7.8958,,C
849,0,2,"Harper, Rev. John",male,28.0,0,1,248727,33.0,,S
850,1,1,"Goldenberg, Mrs. Samuel L (Edwiga Grabowska)",female,29.69911764705882,1,0,17453,89.1042,C92,C
851,0,3,"Andersson, Master. Sigvard Harald Elias",male,4.0,4,2,347082,31.275,,S
852,0,3,"Svensson, Mr. Johan",male,74.0,0,0,347060,7.775,,S
853,0,3,"Boulos, Miss. Nourelain",female,9.0,1,1,2678,15.2458,,C
854,1,1,"Lines, Miss. Mary Conover",female,16.0,0,1,PC 17592,39.4,D28,S
855,0,2,"Carter, Mrs. Ernest Courtenay (Lilian Hughes)",female,44.0,1,0,244252,26.0,,S
856,1,3,"Aks, Mrs. Sam (Leah Rosen)",female,18.0,0,1,392091,9.35,,S
857,1,1,"Wick, Mrs. George Dennick (Mary Hitchcock)",female,45.0,1,1,36928,164.8667,,S
858,1,1,"Daly, Mr. Peter Denis ",male,51.0,0,0,113055,26.55,E17,S
859,1,3,"Baclini, Mrs. Solomon (Latifa Qurban)",female,24.0,0,3,2666,19.2583,,C
860,0,3,"Razi, Mr. Raihed",male,29.69911764705882,0,0,2629,7.2292,,C
861,0,3,"Hansen, Mr. Claus Peter",male,41.0,2,0,350026,14.1083,,S
862,0,2,"Giles, Mr. Frederick Edward",male,21.0,1,0,28134,11.5,,S
863,1,1,"Swift, Mrs. Frederick Joel (Margaret Welles Barron)",female,48.0,0,0,17466,25.9292,D17,S
864,0,3,"Sage, Miss. Dorothy Edith ""Dolly""",female,29.69911764705882,8,2,CA. 2343,69.55,,S
865,0,2,"Gill, Mr. John William",male,24.0,0,0,233866,13.0,,S
866,1,2,"Bystrom, Mrs. (Karolina)",female,42.0,0,0,236852,13.0,,S
867,1,2,"Duran y More, Miss. Asuncion",female,27.0,1,0,SC/PARIS 2149,13.8583,,C
868,0,1,"Roebling, Mr. Washington Augustus II",male,31.0,0,0,PC 17590,50.4958,A24,S
869,0,3,"van Melkebeke, Mr. Philemon",male,29.69911764705882,0,0,345777,9.5,,S
870,1,3,"Johnson, Master. Harold Theodor",male,4.0,1,1,347742,11.1333,,S
871,0,3,"Balkic, Mr. Cerin",male,26.0,0,0,349248,7.8958,,S
872,1,1,"Beckwith, Mrs. Richard Leonard (Sallie Monypeny)",female,47.0,1,1,11751,52.5542,D35,S
873,0,1,"Carlsson, Mr. Frans Olof",male,33.0,0,0,695,5.0,B51 B53 B55,S
874,0,3,"Vander Cruyssen, Mr. Victor",male,47.0,0,0,345765,9.0,,S
875,1,2,"Abelson, Mrs. Samuel (Hannah Wizosky)",female,28.0,1,0,P/PP 3381,24.0,,C
876,1,3,"Najib, Miss. Adele Kiamie ""Jane""",female,15.0,0,0,2667,7.225,,C
877,0,3,"Gustafsson, Mr. Alfred Ossian",male,20.0,0,0,7534,9.8458,,S
878,0,3,"Petroff, Mr. Nedelio",male,19.0,0,0,349212,7.8958,,S
879,0,3,"Laleff, Mr. Kristo",male,29.69911764705882,0,0,349217,7.8958,,S
880,1,1,"Potter, Mrs. Thomas Jr (Lily Alexenia Wilson)",female,56.0,0,1,11767,83.1583,C50,C
881,1,2,"Shelley, Mrs. William (Imanita Parrish Hall)",female,25.0,0,1,230433,26.0,,S
882,0,3,"Markun, Mr. Johann",male,33.0,0,0,349257,7.8958,,S
883,0,3,"Dahlberg, Miss. Gerda Ulrika",female,22.0,0,0,7552,10.5167,,S
884,0,2,"Banfield, Mr. Frederick James",male,28.0,0,0,C.A./SOTON 34068,10.5,,S
885,0,3,"Sutehall, Mr. Henry Jr",male,25.0,0,0,SOTON/OQ 392076,7.05,,S
886,0,3,"Rice, Mrs. William (Margaret Norton)",female,39.0,0,5,382652,29.125,,Q
887,0,2,"Montvila, Rev. Juozas",male,27.0,0,0,211536,13.0,,S
888,1,1,"Graham, Miss. Margaret Edith",female,19.0,0,0,112053,30.0,B42,S
889,0,3,"Johnston, Miss. Catherine Helen ""Carrie""",female,29.69911764705882,1,2,W./C. 6607,23.45,,S
890,1,1,"Behr, Mr. Karl Howell",male,26.0,0,0,111369,30.0,C148,C
891,0,3,"Dooley, Mr. Patrick",male,32.0,0,0,370376,7.75,,Q
1 PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
2 1 0 3 Braund, Mr. Owen Harris male 22.0 1 0 A/5 21171 7.25 S
3 2 1 1 Cumings, Mrs. John Bradley (Florence Briggs Thayer) female 38.0 1 0 PC 17599 71.2833 C85 C
4 3 1 3 Heikkinen, Miss. Laina female 26.0 0 0 STON/O2. 3101282 7.925 S
5 4 1 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35.0 1 0 113803 53.1 C123 S
6 5 0 3 Allen, Mr. William Henry male 35.0 0 0 373450 8.05 S
7 6 0 3 Moran, Mr. James male 29.69911764705882 0 0 330877 8.4583 Q
8 7 0 1 McCarthy, Mr. Timothy J male 54.0 0 0 17463 51.8625 E46 S
9 8 0 3 Palsson, Master. Gosta Leonard male 2.0 3 1 349909 21.075 S
10 9 1 3 Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg) female 27.0 0 2 347742 11.1333 S
11 10 1 2 Nasser, Mrs. Nicholas (Adele Achem) female 14.0 1 0 237736 30.0708 C
12 11 1 3 Sandstrom, Miss. Marguerite Rut female 4.0 1 1 PP 9549 16.7 G6 S
13 12 1 1 Bonnell, Miss. Elizabeth female 58.0 0 0 113783 26.55 C103 S
14 13 0 3 Saundercock, Mr. William Henry male 20.0 0 0 A/5. 2151 8.05 S
15 14 0 3 Andersson, Mr. Anders Johan male 39.0 1 5 347082 31.275 S
16 15 0 3 Vestrom, Miss. Hulda Amanda Adolfina female 14.0 0 0 350406 7.8542 S
17 16 1 2 Hewlett, Mrs. (Mary D Kingcome) female 55.0 0 0 248706 16.0 S
18 17 0 3 Rice, Master. Eugene male 2.0 4 1 382652 29.125 Q
19 18 1 2 Williams, Mr. Charles Eugene male 29.69911764705882 0 0 244373 13.0 S
20 19 0 3 Vander Planke, Mrs. Julius (Emelia Maria Vandemoortele) female 31.0 1 0 345763 18.0 S
21 20 1 3 Masselmani, Mrs. Fatima female 29.69911764705882 0 0 2649 7.225 C
22 21 0 2 Fynney, Mr. Joseph J male 35.0 0 0 239865 26.0 S
23 22 1 2 Beesley, Mr. Lawrence male 34.0 0 0 248698 13.0 D56 S
24 23 1 3 McGowan, Miss. Anna "Annie" female 15.0 0 0 330923 8.0292 Q
25 24 1 1 Sloper, Mr. William Thompson male 28.0 0 0 113788 35.5 A6 S
26 25 0 3 Palsson, Miss. Torborg Danira female 8.0 3 1 349909 21.075 S
27 26 1 3 Asplund, Mrs. Carl Oscar (Selma Augusta Emilia Johansson) female 38.0 1 5 347077 31.3875 S
28 27 0 3 Emir, Mr. Farred Chehab male 29.69911764705882 0 0 2631 7.225 C
29 28 0 1 Fortune, Mr. Charles Alexander male 19.0 3 2 19950 263.0 C23 C25 C27 S
30 29 1 3 O'Dwyer, Miss. Ellen "Nellie" female 29.69911764705882 0 0 330959 7.8792 Q
31 30 0 3 Todoroff, Mr. Lalio male 29.69911764705882 0 0 349216 7.8958 S
32 31 0 1 Uruchurtu, Don. Manuel E male 40.0 0 0 PC 17601 27.7208 C
33 32 1 1 Spencer, Mrs. William Augustus (Marie Eugenie) female 29.69911764705882 1 0 PC 17569 146.5208 B78 C
34 33 1 3 Glynn, Miss. Mary Agatha female 29.69911764705882 0 0 335677 7.75 Q
35 34 0 2 Wheadon, Mr. Edward H male 66.0 0 0 C.A. 24579 10.5 S
36 35 0 1 Meyer, Mr. Edgar Joseph male 28.0 1 0 PC 17604 82.1708 C
37 36 0 1 Holverson, Mr. Alexander Oskar male 42.0 1 0 113789 52.0 S
38 37 1 3 Mamee, Mr. Hanna male 29.69911764705882 0 0 2677 7.2292 C
39 38 0 3 Cann, Mr. Ernest Charles male 21.0 0 0 A./5. 2152 8.05 S
40 39 0 3 Vander Planke, Miss. Augusta Maria female 18.0 2 0 345764 18.0 S
41 40 1 3 Nicola-Yarred, Miss. Jamila female 14.0 1 0 2651 11.2417 C
42 41 0 3 Ahlin, Mrs. Johan (Johanna Persdotter Larsson) female 40.0 1 0 7546 9.475 S
43 42 0 2 Turpin, Mrs. William John Robert (Dorothy Ann Wonnacott) female 27.0 1 0 11668 21.0 S
44 43 0 3 Kraeff, Mr. Theodor male 29.69911764705882 0 0 349253 7.8958 C
45 44 1 2 Laroche, Miss. Simonne Marie Anne Andree female 3.0 1 2 SC/Paris 2123 41.5792 C
46 45 1 3 Devaney, Miss. Margaret Delia female 19.0 0 0 330958 7.8792 Q
47 46 0 3 Rogers, Mr. William John male 29.69911764705882 0 0 S.C./A.4. 23567 8.05 S
48 47 0 3 Lennon, Mr. Denis male 29.69911764705882 1 0 370371 15.5 Q
49 48 1 3 O'Driscoll, Miss. Bridget female 29.69911764705882 0 0 14311 7.75 Q
50 49 0 3 Samaan, Mr. Youssef male 29.69911764705882 2 0 2662 21.6792 C
51 50 0 3 Arnold-Franchi, Mrs. Josef (Josefine Franchi) female 18.0 1 0 349237 17.8 S
52 51 0 3 Panula, Master. Juha Niilo male 7.0 4 1 3101295 39.6875 S
53 52 0 3 Nosworthy, Mr. Richard Cater male 21.0 0 0 A/4. 39886 7.8 S
54 53 1 1 Harper, Mrs. Henry Sleeper (Myna Haxtun) female 49.0 1 0 PC 17572 76.7292 D33 C
55 54 1 2 Faunthorpe, Mrs. Lizzie (Elizabeth Anne Wilkinson) female 29.0 1 0 2926 26.0 S
56 55 0 1 Ostby, Mr. Engelhart Cornelius male 65.0 0 1 113509 61.9792 B30 C
57 56 1 1 Woolner, Mr. Hugh male 29.69911764705882 0 0 19947 35.5 C52 S
58 57 1 2 Rugg, Miss. Emily female 21.0 0 0 C.A. 31026 10.5 S
59 58 0 3 Novel, Mr. Mansouer male 28.5 0 0 2697 7.2292 C
60 59 1 2 West, Miss. Constance Mirium female 5.0 1 2 C.A. 34651 27.75 S
61 60 0 3 Goodwin, Master. William Frederick male 11.0 5 2 CA 2144 46.9 S
62 61 0 3 Sirayanian, Mr. Orsen male 22.0 0 0 2669 7.2292 C
63 62 1 1 Icard, Miss. Amelie female 38.0 0 0 113572 80.0 B28
64 63 0 1 Harris, Mr. Henry Birkhardt male 45.0 1 0 36973 83.475 C83 S
65 64 0 3 Skoog, Master. Harald male 4.0 3 2 347088 27.9 S
66 65 0 1 Stewart, Mr. Albert A male 29.69911764705882 0 0 PC 17605 27.7208 C
67 66 1 3 Moubarek, Master. Gerios male 29.69911764705882 1 1 2661 15.2458 C
68 67 1 2 Nye, Mrs. (Elizabeth Ramell) female 29.0 0 0 C.A. 29395 10.5 F33 S
69 68 0 3 Crease, Mr. Ernest James male 19.0 0 0 S.P. 3464 8.1583 S
70 69 1 3 Andersson, Miss. Erna Alexandra female 17.0 4 2 3101281 7.925 S
71 70 0 3 Kink, Mr. Vincenz male 26.0 2 0 315151 8.6625 S
72 71 0 2 Jenkin, Mr. Stephen Curnow male 32.0 0 0 C.A. 33111 10.5 S
73 72 0 3 Goodwin, Miss. Lillian Amy female 16.0 5 2 CA 2144 46.9 S
74 73 0 2 Hood, Mr. Ambrose Jr male 21.0 0 0 S.O.C. 14879 73.5 S
75 74 0 3 Chronopoulos, Mr. Apostolos male 26.0 1 0 2680 14.4542 C
76 75 1 3 Bing, Mr. Lee male 32.0 0 0 1601 56.4958 S
77 76 0 3 Moen, Mr. Sigurd Hansen male 25.0 0 0 348123 7.65 F G73 S
78 77 0 3 Staneff, Mr. Ivan male 29.69911764705882 0 0 349208 7.8958 S
79 78 0 3 Moutal, Mr. Rahamin Haim male 29.69911764705882 0 0 374746 8.05 S
80 79 1 2 Caldwell, Master. Alden Gates male 0.83 0 2 248738 29.0 S
81 80 1 3 Dowdell, Miss. Elizabeth female 30.0 0 0 364516 12.475 S
82 81 0 3 Waelens, Mr. Achille male 22.0 0 0 345767 9.0 S
83 82 1 3 Sheerlinck, Mr. Jan Baptist male 29.0 0 0 345779 9.5 S
84 83 1 3 McDermott, Miss. Brigdet Delia female 29.69911764705882 0 0 330932 7.7875 Q
85 84 0 1 Carrau, Mr. Francisco M male 28.0 0 0 113059 47.1 S
86 85 1 2 Ilett, Miss. Bertha female 17.0 0 0 SO/C 14885 10.5 S
87 86 1 3 Backstrom, Mrs. Karl Alfred (Maria Mathilda Gustafsson) female 33.0 3 0 3101278 15.85 S
88 87 0 3 Ford, Mr. William Neal male 16.0 1 3 W./C. 6608 34.375 S
89 88 0 3 Slocovski, Mr. Selman Francis male 29.69911764705882 0 0 SOTON/OQ 392086 8.05 S
90 89 1 1 Fortune, Miss. Mabel Helen female 23.0 3 2 19950 263.0 C23 C25 C27 S
91 90 0 3 Celotti, Mr. Francesco male 24.0 0 0 343275 8.05 S
92 91 0 3 Christmann, Mr. Emil male 29.0 0 0 343276 8.05 S
93 92 0 3 Andreasson, Mr. Paul Edvin male 20.0 0 0 347466 7.8542 S
94 93 0 1 Chaffee, Mr. Herbert Fuller male 46.0 1 0 W.E.P. 5734 61.175 E31 S
95 94 0 3 Dean, Mr. Bertram Frank male 26.0 1 2 C.A. 2315 20.575 S
96 95 0 3 Coxon, Mr. Daniel male 59.0 0 0 364500 7.25 S
97 96 0 3 Shorney, Mr. Charles Joseph male 29.69911764705882 0 0 374910 8.05 S
98 97 0 1 Goldschmidt, Mr. George B male 71.0 0 0 PC 17754 34.6542 A5 C
99 98 1 1 Greenfield, Mr. William Bertram male 23.0 0 1 PC 17759 63.3583 D10 D12 C
100 99 1 2 Doling, Mrs. John T (Ada Julia Bone) female 34.0 0 1 231919 23.0 S
101 100 0 2 Kantor, Mr. Sinai male 34.0 1 0 244367 26.0 S
102 101 0 3 Petranec, Miss. Matilda female 28.0 0 0 349245 7.8958 S
103 102 0 3 Petroff, Mr. Pastcho ("Pentcho") male 29.69911764705882 0 0 349215 7.8958 S
104 103 0 1 White, Mr. Richard Frasar male 21.0 0 1 35281 77.2875 D26 S
105 104 0 3 Johansson, Mr. Gustaf Joel male 33.0 0 0 7540 8.6542 S
106 105 0 3 Gustafsson, Mr. Anders Vilhelm male 37.0 2 0 3101276 7.925 S
107 106 0 3 Mionoff, Mr. Stoytcho male 28.0 0 0 349207 7.8958 S
108 107 1 3 Salkjelsvik, Miss. Anna Kristine female 21.0 0 0 343120 7.65 S
109 108 1 3 Moss, Mr. Albert Johan male 29.69911764705882 0 0 312991 7.775 S
110 109 0 3 Rekic, Mr. Tido male 38.0 0 0 349249 7.8958 S
111 110 1 3 Moran, Miss. Bertha female 29.69911764705882 1 0 371110 24.15 Q
112 111 0 1 Porter, Mr. Walter Chamberlain male 47.0 0 0 110465 52.0 C110 S
113 112 0 3 Zabour, Miss. Hileni female 14.5 1 0 2665 14.4542 C
114 113 0 3 Barton, Mr. David John male 22.0 0 0 324669 8.05 S
115 114 0 3 Jussila, Miss. Katriina female 20.0 1 0 4136 9.825 S
116 115 0 3 Attalah, Miss. Malake female 17.0 0 0 2627 14.4583 C
117 116 0 3 Pekoniemi, Mr. Edvard male 21.0 0 0 STON/O 2. 3101294 7.925 S
118 117 0 3 Connors, Mr. Patrick male 70.5 0 0 370369 7.75 Q
119 118 0 2 Turpin, Mr. William John Robert male 29.0 1 0 11668 21.0 S
120 119 0 1 Baxter, Mr. Quigg Edmond male 24.0 0 1 PC 17558 247.5208 B58 B60 C
121 120 0 3 Andersson, Miss. Ellis Anna Maria female 2.0 4 2 347082 31.275 S
122 121 0 2 Hickman, Mr. Stanley George male 21.0 2 0 S.O.C. 14879 73.5 S
123 122 0 3 Moore, Mr. Leonard Charles male 29.69911764705882 0 0 A4. 54510 8.05 S
124 123 0 2 Nasser, Mr. Nicholas male 32.5 1 0 237736 30.0708 C
125 124 1 2 Webber, Miss. Susan female 32.5 0 0 27267 13.0 E101 S
126 125 0 1 White, Mr. Percival Wayland male 54.0 0 1 35281 77.2875 D26 S
127 126 1 3 Nicola-Yarred, Master. Elias male 12.0 1 0 2651 11.2417 C
128 127 0 3 McMahon, Mr. Martin male 29.69911764705882 0 0 370372 7.75 Q
129 128 1 3 Madsen, Mr. Fridtjof Arne male 24.0 0 0 C 17369 7.1417 S
130 129 1 3 Peter, Miss. Anna female 29.69911764705882 1 1 2668 22.3583 F E69 C
131 130 0 3 Ekstrom, Mr. Johan male 45.0 0 0 347061 6.975 S
132 131 0 3 Drazenoic, Mr. Jozef male 33.0 0 0 349241 7.8958 C
133 132 0 3 Coelho, Mr. Domingos Fernandeo male 20.0 0 0 SOTON/O.Q. 3101307 7.05 S
134 133 0 3 Robins, Mrs. Alexander A (Grace Charity Laury) female 47.0 1 0 A/5. 3337 14.5 S
135 134 1 2 Weisz, Mrs. Leopold (Mathilde Francoise Pede) female 29.0 1 0 228414 26.0 S
136 135 0 2 Sobey, Mr. Samuel James Hayden male 25.0 0 0 C.A. 29178 13.0 S
137 136 0 2 Richard, Mr. Emile male 23.0 0 0 SC/PARIS 2133 15.0458 C
138 137 1 1 Newsom, Miss. Helen Monypeny female 19.0 0 2 11752 26.2833 D47 S
139 138 0 1 Futrelle, Mr. Jacques Heath male 37.0 1 0 113803 53.1 C123 S
140 139 0 3 Osen, Mr. Olaf Elon male 16.0 0 0 7534 9.2167 S
141 140 0 1 Giglio, Mr. Victor male 24.0 0 0 PC 17593 79.2 B86 C
142 141 0 3 Boulos, Mrs. Joseph (Sultana) female 29.69911764705882 0 2 2678 15.2458 C
143 142 1 3 Nysten, Miss. Anna Sofia female 22.0 0 0 347081 7.75 S
144 143 1 3 Hakkarainen, Mrs. Pekka Pietari (Elin Matilda Dolck) female 24.0 1 0 STON/O2. 3101279 15.85 S
145 144 0 3 Burke, Mr. Jeremiah male 19.0 0 0 365222 6.75 Q
146 145 0 2 Andrew, Mr. Edgardo Samuel male 18.0 0 0 231945 11.5 S
147 146 0 2 Nicholls, Mr. Joseph Charles male 19.0 1 1 C.A. 33112 36.75 S
148 147 1 3 Andersson, Mr. August Edvard ("Wennerstrom") male 27.0 0 0 350043 7.7958 S
149 148 0 3 Ford, Miss. Robina Maggie "Ruby" female 9.0 2 2 W./C. 6608 34.375 S
150 149 0 2 Navratil, Mr. Michel ("Louis M Hoffman") male 36.5 0 2 230080 26.0 F2 S
151 150 0 2 Byles, Rev. Thomas Roussel Davids male 42.0 0 0 244310 13.0 S
152 151 0 2 Bateman, Rev. Robert James male 51.0 0 0 S.O.P. 1166 12.525 S
153 152 1 1 Pears, Mrs. Thomas (Edith Wearne) female 22.0 1 0 113776 66.6 C2 S
154 153 0 3 Meo, Mr. Alfonzo male 55.5 0 0 A.5. 11206 8.05 S
155 154 0 3 van Billiard, Mr. Austin Blyler male 40.5 0 2 A/5. 851 14.5 S
156 155 0 3 Olsen, Mr. Ole Martin male 29.69911764705882 0 0 Fa 265302 7.3125 S
157 156 0 1 Williams, Mr. Charles Duane male 51.0 0 1 PC 17597 61.3792 C
158 157 1 3 Gilnagh, Miss. Katherine "Katie" female 16.0 0 0 35851 7.7333 Q
159 158 0 3 Corn, Mr. Harry male 30.0 0 0 SOTON/OQ 392090 8.05 S
160 159 0 3 Smiljanic, Mr. Mile male 29.69911764705882 0 0 315037 8.6625 S
161 160 0 3 Sage, Master. Thomas Henry male 29.69911764705882 8 2 CA. 2343 69.55 S
162 161 0 3 Cribb, Mr. John Hatfield male 44.0 0 1 371362 16.1 S
163 162 1 2 Watt, Mrs. James (Elizabeth "Bessie" Inglis Milne) female 40.0 0 0 C.A. 33595 15.75 S
164 163 0 3 Bengtsson, Mr. John Viktor male 26.0 0 0 347068 7.775 S
165 164 0 3 Calic, Mr. Jovo male 17.0 0 0 315093 8.6625 S
166 165 0 3 Panula, Master. Eino Viljami male 1.0 4 1 3101295 39.6875 S
167 166 1 3 Goldsmith, Master. Frank John William "Frankie" male 9.0 0 2 363291 20.525 S
168 167 1 1 Chibnall, Mrs. (Edith Martha Bowerman) female 29.69911764705882 0 1 113505 55.0 E33 S
169 168 0 3 Skoog, Mrs. William (Anna Bernhardina Karlsson) female 45.0 1 4 347088 27.9 S
170 169 0 1 Baumann, Mr. John D male 29.69911764705882 0 0 PC 17318 25.925 S
171 170 0 3 Ling, Mr. Lee male 28.0 0 0 1601 56.4958 S
172 171 0 1 Van der hoef, Mr. Wyckoff male 61.0 0 0 111240 33.5 B19 S
173 172 0 3 Rice, Master. Arthur male 4.0 4 1 382652 29.125 Q
174 173 1 3 Johnson, Miss. Eleanor Ileen female 1.0 1 1 347742 11.1333 S
175 174 0 3 Sivola, Mr. Antti Wilhelm male 21.0 0 0 STON/O 2. 3101280 7.925 S
176 175 0 1 Smith, Mr. James Clinch male 56.0 0 0 17764 30.6958 A7 C
177 176 0 3 Klasen, Mr. Klas Albin male 18.0 1 1 350404 7.8542 S
178 177 0 3 Lefebre, Master. Henry Forbes male 29.69911764705882 3 1 4133 25.4667 S
179 178 0 1 Isham, Miss. Ann Elizabeth female 50.0 0 0 PC 17595 28.7125 C49 C
180 179 0 2 Hale, Mr. Reginald male 30.0 0 0 250653 13.0 S
181 180 0 3 Leonard, Mr. Lionel male 36.0 0 0 LINE 0.0 S
182 181 0 3 Sage, Miss. Constance Gladys female 29.69911764705882 8 2 CA. 2343 69.55 S
183 182 0 2 Pernot, Mr. Rene male 29.69911764705882 0 0 SC/PARIS 2131 15.05 C
184 183 0 3 Asplund, Master. Clarence Gustaf Hugo male 9.0 4 2 347077 31.3875 S
185 184 1 2 Becker, Master. Richard F male 1.0 2 1 230136 39.0 F4 S
186 185 1 3 Kink-Heilmann, Miss. Luise Gretchen female 4.0 0 2 315153 22.025 S
187 186 0 1 Rood, Mr. Hugh Roscoe male 29.69911764705882 0 0 113767 50.0 A32 S
188 187 1 3 O'Brien, Mrs. Thomas (Johanna "Hannah" Godfrey) female 29.69911764705882 1 0 370365 15.5 Q
189 188 1 1 Romaine, Mr. Charles Hallace ("Mr C Rolmane") male 45.0 0 0 111428 26.55 S
190 189 0 3 Bourke, Mr. John male 40.0 1 1 364849 15.5 Q
191 190 0 3 Turcin, Mr. Stjepan male 36.0 0 0 349247 7.8958 S
192 191 1 2 Pinsky, Mrs. (Rosa) female 32.0 0 0 234604 13.0 S
193 192 0 2 Carbines, Mr. William male 19.0 0 0 28424 13.0 S
194 193 1 3 Andersen-Jensen, Miss. Carla Christine Nielsine female 19.0 1 0 350046 7.8542 S
195 194 1 2 Navratil, Master. Michel M male 3.0 1 1 230080 26.0 F2 S
196 195 1 1 Brown, Mrs. James Joseph (Margaret Tobin) female 44.0 0 0 PC 17610 27.7208 B4 C
197 196 1 1 Lurette, Miss. Elise female 58.0 0 0 PC 17569 146.5208 B80 C
198 197 0 3 Mernagh, Mr. Robert male 29.69911764705882 0 0 368703 7.75 Q
199 198 0 3 Olsen, Mr. Karl Siegwart Andreas male 42.0 0 1 4579 8.4042 S
200 199 1 3 Madigan, Miss. Margaret "Maggie" female 29.69911764705882 0 0 370370 7.75 Q
201 200 0 2 Yrois, Miss. Henriette ("Mrs Harbeck") female 24.0 0 0 248747 13.0 S
202 201 0 3 Vande Walle, Mr. Nestor Cyriel male 28.0 0 0 345770 9.5 S
203 202 0 3 Sage, Mr. Frederick male 29.69911764705882 8 2 CA. 2343 69.55 S
204 203 0 3 Johanson, Mr. Jakob Alfred male 34.0 0 0 3101264 6.4958 S
205 204 0 3 Youseff, Mr. Gerious male 45.5 0 0 2628 7.225 C
206 205 1 3 Cohen, Mr. Gurshon "Gus" male 18.0 0 0 A/5 3540 8.05 S
207 206 0 3 Strom, Miss. Telma Matilda female 2.0 0 1 347054 10.4625 G6 S
208 207 0 3 Backstrom, Mr. Karl Alfred male 32.0 1 0 3101278 15.85 S
209 208 1 3 Albimona, Mr. Nassef Cassem male 26.0 0 0 2699 18.7875 C
210 209 1 3 Carr, Miss. Helen "Ellen" female 16.0 0 0 367231 7.75 Q
211 210 1 1 Blank, Mr. Henry male 40.0 0 0 112277 31.0 A31 C
212 211 0 3 Ali, Mr. Ahmed male 24.0 0 0 SOTON/O.Q. 3101311 7.05 S
213 212 1 2 Cameron, Miss. Clear Annie female 35.0 0 0 F.C.C. 13528 21.0 S
214 213 0 3 Perkin, Mr. John Henry male 22.0 0 0 A/5 21174 7.25 S
215 214 0 2 Givard, Mr. Hans Kristensen male 30.0 0 0 250646 13.0 S
216 215 0 3 Kiernan, Mr. Philip male 29.69911764705882 1 0 367229 7.75 Q
217 216 1 1 Newell, Miss. Madeleine female 31.0 1 0 35273 113.275 D36 C
218 217 1 3 Honkanen, Miss. Eliina female 27.0 0 0 STON/O2. 3101283 7.925 S
219 218 0 2 Jacobsohn, Mr. Sidney Samuel male 42.0 1 0 243847 27.0 S
220 219 1 1 Bazzani, Miss. Albina female 32.0 0 0 11813 76.2917 D15 C
221 220 0 2 Harris, Mr. Walter male 30.0 0 0 W/C 14208 10.5 S
222 221 1 3 Sunderland, Mr. Victor Francis male 16.0 0 0 SOTON/OQ 392089 8.05 S
223 222 0 2 Bracken, Mr. James H male 27.0 0 0 220367 13.0 S
224 223 0 3 Green, Mr. George Henry male 51.0 0 0 21440 8.05 S
225 224 0 3 Nenkoff, Mr. Christo male 29.69911764705882 0 0 349234 7.8958 S
226 225 1 1 Hoyt, Mr. Frederick Maxfield male 38.0 1 0 19943 90.0 C93 S
227 226 0 3 Berglund, Mr. Karl Ivar Sven male 22.0 0 0 PP 4348 9.35 S
228 227 1 2 Mellors, Mr. William John male 19.0 0 0 SW/PP 751 10.5 S
229 228 0 3 Lovell, Mr. John Hall ("Henry") male 20.5 0 0 A/5 21173 7.25 S
230 229 0 2 Fahlstrom, Mr. Arne Jonas male 18.0 0 0 236171 13.0 S
231 230 0 3 Lefebre, Miss. Mathilde female 29.69911764705882 3 1 4133 25.4667 S
232 231 1 1 Harris, Mrs. Henry Birkhardt (Irene Wallach) female 35.0 1 0 36973 83.475 C83 S
233 232 0 3 Larsson, Mr. Bengt Edvin male 29.0 0 0 347067 7.775 S
234 233 0 2 Sjostedt, Mr. Ernst Adolf male 59.0 0 0 237442 13.5 S
235 234 1 3 Asplund, Miss. Lillian Gertrud female 5.0 4 2 347077 31.3875 S
236 235 0 2 Leyson, Mr. Robert William Norman male 24.0 0 0 C.A. 29566 10.5 S
237 236 0 3 Harknett, Miss. Alice Phoebe female 29.69911764705882 0 0 W./C. 6609 7.55 S
238 237 0 2 Hold, Mr. Stephen male 44.0 1 0 26707 26.0 S
239 238 1 2 Collyer, Miss. Marjorie "Lottie" female 8.0 0 2 C.A. 31921 26.25 S
240 239 0 2 Pengelly, Mr. Frederick William male 19.0 0 0 28665 10.5 S
241 240 0 2 Hunt, Mr. George Henry male 33.0 0 0 SCO/W 1585 12.275 S
242 241 0 3 Zabour, Miss. Thamine female 29.69911764705882 1 0 2665 14.4542 C
243 242 1 3 Murphy, Miss. Katherine "Kate" female 29.69911764705882 1 0 367230 15.5 Q
244 243 0 2 Coleridge, Mr. Reginald Charles male 29.0 0 0 W./C. 14263 10.5 S
245 244 0 3 Maenpaa, Mr. Matti Alexanteri male 22.0 0 0 STON/O 2. 3101275 7.125 S
246 245 0 3 Attalah, Mr. Sleiman male 30.0 0 0 2694 7.225 C
247 246 0 1 Minahan, Dr. William Edward male 44.0 2 0 19928 90.0 C78 Q
248 247 0 3 Lindahl, Miss. Agda Thorilda Viktoria female 25.0 0 0 347071 7.775 S
249 248 1 2 Hamalainen, Mrs. William (Anna) female 24.0 0 2 250649 14.5 S
250 249 1 1 Beckwith, Mr. Richard Leonard male 37.0 1 1 11751 52.5542 D35 S
251 250 0 2 Carter, Rev. Ernest Courtenay male 54.0 1 0 244252 26.0 S
252 251 0 3 Reed, Mr. James George male 29.69911764705882 0 0 362316 7.25 S
253 252 0 3 Strom, Mrs. Wilhelm (Elna Matilda Persson) female 29.0 1 1 347054 10.4625 G6 S
254 253 0 1 Stead, Mr. William Thomas male 62.0 0 0 113514 26.55 C87 S
255 254 0 3 Lobb, Mr. William Arthur male 30.0 1 0 A/5. 3336 16.1 S
256 255 0 3 Rosblom, Mrs. Viktor (Helena Wilhelmina) female 41.0 0 2 370129 20.2125 S
257 256 1 3 Touma, Mrs. Darwis (Hanne Youssef Razi) female 29.0 0 2 2650 15.2458 C
258 257 1 1 Thorne, Mrs. Gertrude Maybelle female 29.69911764705882 0 0 PC 17585 79.2 C
259 258 1 1 Cherry, Miss. Gladys female 30.0 0 0 110152 86.5 B77 S
260 259 1 1 Ward, Miss. Anna female 35.0 0 0 PC 17755 512.3292 C
261 260 1 2 Parrish, Mrs. (Lutie Davis) female 50.0 0 1 230433 26.0 S
262 261 0 3 Smith, Mr. Thomas male 29.69911764705882 0 0 384461 7.75 Q
263 262 1 3 Asplund, Master. Edvin Rojj Felix male 3.0 4 2 347077 31.3875 S
264 263 0 1 Taussig, Mr. Emil male 52.0 1 1 110413 79.65 E67 S
265 264 0 1 Harrison, Mr. William male 40.0 0 0 112059 0.0 B94 S
266 265 0 3 Henry, Miss. Delia female 29.69911764705882 0 0 382649 7.75 Q
267 266 0 2 Reeves, Mr. David male 36.0 0 0 C.A. 17248 10.5 S
268 267 0 3 Panula, Mr. Ernesti Arvid male 16.0 4 1 3101295 39.6875 S
269 268 1 3 Persson, Mr. Ernst Ulrik male 25.0 1 0 347083 7.775 S
270 269 1 1 Graham, Mrs. William Thompson (Edith Junkins) female 58.0 0 1 PC 17582 153.4625 C125 S
271 270 1 1 Bissette, Miss. Amelia female 35.0 0 0 PC 17760 135.6333 C99 S
272 271 0 1 Cairns, Mr. Alexander male 29.69911764705882 0 0 113798 31.0 S
273 272 1 3 Tornquist, Mr. William Henry male 25.0 0 0 LINE 0.0 S
274 273 1 2 Mellinger, Mrs. (Elizabeth Anne Maidment) female 41.0 0 1 250644 19.5 S
275 274 0 1 Natsch, Mr. Charles H male 37.0 0 1 PC 17596 29.7 C118 C
276 275 1 3 Healy, Miss. Hanora "Nora" female 29.69911764705882 0 0 370375 7.75 Q
277 276 1 1 Andrews, Miss. Kornelia Theodosia female 63.0 1 0 13502 77.9583 D7 S
278 277 0 3 Lindblom, Miss. Augusta Charlotta female 45.0 0 0 347073 7.75 S
279 278 0 2 Parkes, Mr. Francis "Frank" male 29.69911764705882 0 0 239853 0.0 S
280 279 0 3 Rice, Master. Eric male 7.0 4 1 382652 29.125 Q
281 280 1 3 Abbott, Mrs. Stanton (Rosa Hunt) female 35.0 1 1 C.A. 2673 20.25 S
282 281 0 3 Duane, Mr. Frank male 65.0 0 0 336439 7.75 Q
283 282 0 3 Olsson, Mr. Nils Johan Goransson male 28.0 0 0 347464 7.8542 S
284 283 0 3 de Pelsmaeker, Mr. Alfons male 16.0 0 0 345778 9.5 S
285 284 1 3 Dorking, Mr. Edward Arthur male 19.0 0 0 A/5. 10482 8.05 S
286 285 0 1 Smith, Mr. Richard William male 29.69911764705882 0 0 113056 26.0 A19 S
287 286 0 3 Stankovic, Mr. Ivan male 33.0 0 0 349239 8.6625 C
288 287 1 3 de Mulder, Mr. Theodore male 30.0 0 0 345774 9.5 S
289 288 0 3 Naidenoff, Mr. Penko male 22.0 0 0 349206 7.8958 S
290 289 1 2 Hosono, Mr. Masabumi male 42.0 0 0 237798 13.0 S
291 290 1 3 Connolly, Miss. Kate female 22.0 0 0 370373 7.75 Q
292 291 1 1 Barber, Miss. Ellen "Nellie" female 26.0 0 0 19877 78.85 S
293 292 1 1 Bishop, Mrs. Dickinson H (Helen Walton) female 19.0 1 0 11967 91.0792 B49 C
294 293 0 2 Levy, Mr. Rene Jacques male 36.0 0 0 SC/Paris 2163 12.875 D C
295 294 0 3 Haas, Miss. Aloisia female 24.0 0 0 349236 8.85 S
296 295 0 3 Mineff, Mr. Ivan male 24.0 0 0 349233 7.8958 S
297 296 0 1 Lewy, Mr. Ervin G male 29.69911764705882 0 0 PC 17612 27.7208 C
298 297 0 3 Hanna, Mr. Mansour male 23.5 0 0 2693 7.2292 C
299 298 0 1 Allison, Miss. Helen Loraine female 2.0 1 2 113781 151.55 C22 C26 S
300 299 1 1 Saalfeld, Mr. Adolphe male 29.69911764705882 0 0 19988 30.5 C106 S
301 300 1 1 Baxter, Mrs. James (Helene DeLaudeniere Chaput) female 50.0 0 1 PC 17558 247.5208 B58 B60 C
302 301 1 3 Kelly, Miss. Anna Katherine "Annie Kate" female 29.69911764705882 0 0 9234 7.75 Q
303 302 1 3 McCoy, Mr. Bernard male 29.69911764705882 2 0 367226 23.25 Q
304 303 0 3 Johnson, Mr. William Cahoone Jr male 19.0 0 0 LINE 0.0 S
305 304 1 2 Keane, Miss. Nora A female 29.69911764705882 0 0 226593 12.35 E101 Q
306 305 0 3 Williams, Mr. Howard Hugh "Harry" male 29.69911764705882 0 0 A/5 2466 8.05 S
307 306 1 1 Allison, Master. Hudson Trevor male 0.92 1 2 113781 151.55 C22 C26 S
308 307 1 1 Fleming, Miss. Margaret female 29.69911764705882 0 0 17421 110.8833 C
309 308 1 1 Penasco y Castellana, Mrs. Victor de Satode (Maria Josefa Perez de Soto y Vallejo) female 17.0 1 0 PC 17758 108.9 C65 C
310 309 0 2 Abelson, Mr. Samuel male 30.0 1 0 P/PP 3381 24.0 C
311 310 1 1 Francatelli, Miss. Laura Mabel female 30.0 0 0 PC 17485 56.9292 E36 C
312 311 1 1 Hays, Miss. Margaret Bechstein female 24.0 0 0 11767 83.1583 C54 C
313 312 1 1 Ryerson, Miss. Emily Borie female 18.0 2 2 PC 17608 262.375 B57 B59 B63 B66 C
314 313 0 2 Lahtinen, Mrs. William (Anna Sylfven) female 26.0 1 1 250651 26.0 S
315 314 0 3 Hendekovic, Mr. Ignjac male 28.0 0 0 349243 7.8958 S
316 315 0 2 Hart, Mr. Benjamin male 43.0 1 1 F.C.C. 13529 26.25 S
317 316 1 3 Nilsson, Miss. Helmina Josefina female 26.0 0 0 347470 7.8542 S
318 317 1 2 Kantor, Mrs. Sinai (Miriam Sternin) female 24.0 1 0 244367 26.0 S
319 318 0 2 Moraweck, Dr. Ernest male 54.0 0 0 29011 14.0 S
320 319 1 1 Wick, Miss. Mary Natalie female 31.0 0 2 36928 164.8667 C7 S
321 320 1 1 Spedden, Mrs. Frederic Oakley (Margaretta Corning Stone) female 40.0 1 1 16966 134.5 E34 C
322 321 0 3 Dennis, Mr. Samuel male 22.0 0 0 A/5 21172 7.25 S
323 322 0 3 Danoff, Mr. Yoto male 27.0 0 0 349219 7.8958 S
324 323 1 2 Slayter, Miss. Hilda Mary female 30.0 0 0 234818 12.35 Q
325 324 1 2 Caldwell, Mrs. Albert Francis (Sylvia Mae Harbaugh) female 22.0 1 1 248738 29.0 S
326 325 0 3 Sage, Mr. George John Jr male 29.69911764705882 8 2 CA. 2343 69.55 S
327 326 1 1 Young, Miss. Marie Grice female 36.0 0 0 PC 17760 135.6333 C32 C
328 327 0 3 Nysveen, Mr. Johan Hansen male 61.0 0 0 345364 6.2375 S
329 328 1 2 Ball, Mrs. (Ada E Hall) female 36.0 0 0 28551 13.0 D S
330 329 1 3 Goldsmith, Mrs. Frank John (Emily Alice Brown) female 31.0 1 1 363291 20.525 S
331 330 1 1 Hippach, Miss. Jean Gertrude female 16.0 0 1 111361 57.9792 B18 C
332 331 1 3 McCoy, Miss. Agnes female 29.69911764705882 2 0 367226 23.25 Q
333 332 0 1 Partner, Mr. Austen male 45.5 0 0 113043 28.5 C124 S
334 333 0 1 Graham, Mr. George Edward male 38.0 0 1 PC 17582 153.4625 C91 S
335 334 0 3 Vander Planke, Mr. Leo Edmondus male 16.0 2 0 345764 18.0 S
336 335 1 1 Frauenthal, Mrs. Henry William (Clara Heinsheimer) female 29.69911764705882 1 0 PC 17611 133.65 S
337 336 0 3 Denkoff, Mr. Mitto male 29.69911764705882 0 0 349225 7.8958 S
338 337 0 1 Pears, Mr. Thomas Clinton male 29.0 1 0 113776 66.6 C2 S
339 338 1 1 Burns, Miss. Elizabeth Margaret female 41.0 0 0 16966 134.5 E40 C
340 339 1 3 Dahl, Mr. Karl Edwart male 45.0 0 0 7598 8.05 S
341 340 0 1 Blackwell, Mr. Stephen Weart male 45.0 0 0 113784 35.5 T S
342 341 1 2 Navratil, Master. Edmond Roger male 2.0 1 1 230080 26.0 F2 S
343 342 1 1 Fortune, Miss. Alice Elizabeth female 24.0 3 2 19950 263.0 C23 C25 C27 S
344 343 0 2 Collander, Mr. Erik Gustaf male 28.0 0 0 248740 13.0 S
345 344 0 2 Sedgwick, Mr. Charles Frederick Waddington male 25.0 0 0 244361 13.0 S
346 345 0 2 Fox, Mr. Stanley Hubert male 36.0 0 0 229236 13.0 S
347 346 1 2 Brown, Miss. Amelia "Mildred" female 24.0 0 0 248733 13.0 F33 S
348 347 1 2 Smith, Miss. Marion Elsie female 40.0 0 0 31418 13.0 S
349 348 1 3 Davison, Mrs. Thomas Henry (Mary E Finck) female 29.69911764705882 1 0 386525 16.1 S
350 349 1 3 Coutts, Master. William Loch "William" male 3.0 1 1 C.A. 37671 15.9 S
351 350 0 3 Dimic, Mr. Jovan male 42.0 0 0 315088 8.6625 S
352 351 0 3 Odahl, Mr. Nils Martin male 23.0 0 0 7267 9.225 S
353 352 0 1 Williams-Lambert, Mr. Fletcher Fellows male 29.69911764705882 0 0 113510 35.0 C128 S
354 353 0 3 Elias, Mr. Tannous male 15.0 1 1 2695 7.2292 C
355 354 0 3 Arnold-Franchi, Mr. Josef male 25.0 1 0 349237 17.8 S
356 355 0 3 Yousif, Mr. Wazli male 29.69911764705882 0 0 2647 7.225 C
357 356 0 3 Vanden Steen, Mr. Leo Peter male 28.0 0 0 345783 9.5 S
358 357 1 1 Bowerman, Miss. Elsie Edith female 22.0 0 1 113505 55.0 E33 S
359 358 0 2 Funk, Miss. Annie Clemmer female 38.0 0 0 237671 13.0 S
360 359 1 3 McGovern, Miss. Mary female 29.69911764705882 0 0 330931 7.8792 Q
361 360 1 3 Mockler, Miss. Helen Mary "Ellie" female 29.69911764705882 0 0 330980 7.8792 Q
362 361 0 3 Skoog, Mr. Wilhelm male 40.0 1 4 347088 27.9 S
363 362 0 2 del Carlo, Mr. Sebastiano male 29.0 1 0 SC/PARIS 2167 27.7208 C
364 363 0 3 Barbara, Mrs. (Catherine David) female 45.0 0 1 2691 14.4542 C
365 364 0 3 Asim, Mr. Adola male 35.0 0 0 SOTON/O.Q. 3101310 7.05 S
366 365 0 3 O'Brien, Mr. Thomas male 29.69911764705882 1 0 370365 15.5 Q
367 366 0 3 Adahl, Mr. Mauritz Nils Martin male 30.0 0 0 C 7076 7.25 S
368 367 1 1 Warren, Mrs. Frank Manley (Anna Sophia Atkinson) female 60.0 1 0 110813 75.25 D37 C
369 368 1 3 Moussa, Mrs. (Mantoura Boulos) female 29.69911764705882 0 0 2626 7.2292 C
370 369 1 3 Jermyn, Miss. Annie female 29.69911764705882 0 0 14313 7.75 Q
371 370 1 1 Aubart, Mme. Leontine Pauline female 24.0 0 0 PC 17477 69.3 B35 C
372 371 1 1 Harder, Mr. George Achilles male 25.0 1 0 11765 55.4417 E50 C
373 372 0 3 Wiklund, Mr. Jakob Alfred male 18.0 1 0 3101267 6.4958 S
374 373 0 3 Beavan, Mr. William Thomas male 19.0 0 0 323951 8.05 S
375 374 0 1 Ringhini, Mr. Sante male 22.0 0 0 PC 17760 135.6333 C
376 375 0 3 Palsson, Miss. Stina Viola female 3.0 3 1 349909 21.075 S
377 376 1 1 Meyer, Mrs. Edgar Joseph (Leila Saks) female 29.69911764705882 1 0 PC 17604 82.1708 C
378 377 1 3 Landergren, Miss. Aurora Adelia female 22.0 0 0 C 7077 7.25 S
379 378 0 1 Widener, Mr. Harry Elkins male 27.0 0 2 113503 211.5 C82 C
380 379 0 3 Betros, Mr. Tannous male 20.0 0 0 2648 4.0125 C
381 380 0 3 Gustafsson, Mr. Karl Gideon male 19.0 0 0 347069 7.775 S
382 381 1 1 Bidois, Miss. Rosalie female 42.0 0 0 PC 17757 227.525 C
383 382 1 3 Nakid, Miss. Maria ("Mary") female 1.0 0 2 2653 15.7417 C
384 383 0 3 Tikkanen, Mr. Juho male 32.0 0 0 STON/O 2. 3101293 7.925 S
385 384 1 1 Holverson, Mrs. Alexander Oskar (Mary Aline Towner) female 35.0 1 0 113789 52.0 S
386 385 0 3 Plotcharsky, Mr. Vasil male 29.69911764705882 0 0 349227 7.8958 S
387 386 0 2 Davies, Mr. Charles Henry male 18.0 0 0 S.O.C. 14879 73.5 S
388 387 0 3 Goodwin, Master. Sidney Leonard male 1.0 5 2 CA 2144 46.9 S
389 388 1 2 Buss, Miss. Kate female 36.0 0 0 27849 13.0 S
390 389 0 3 Sadlier, Mr. Matthew male 29.69911764705882 0 0 367655 7.7292 Q
391 390 1 2 Lehmann, Miss. Bertha female 17.0 0 0 SC 1748 12.0 C
392 391 1 1 Carter, Mr. William Ernest male 36.0 1 2 113760 120.0 B96 B98 S
393 392 1 3 Jansson, Mr. Carl Olof male 21.0 0 0 350034 7.7958 S
394 393 0 3 Gustafsson, Mr. Johan Birger male 28.0 2 0 3101277 7.925 S
395 394 1 1 Newell, Miss. Marjorie female 23.0 1 0 35273 113.275 D36 C
396 395 1 3 Sandstrom, Mrs. Hjalmar (Agnes Charlotta Bengtsson) female 24.0 0 2 PP 9549 16.7 G6 S
397 396 0 3 Johansson, Mr. Erik male 22.0 0 0 350052 7.7958 S
398 397 0 3 Olsson, Miss. Elina female 31.0 0 0 350407 7.8542 S
399 398 0 2 McKane, Mr. Peter David male 46.0 0 0 28403 26.0 S
400 399 0 2 Pain, Dr. Alfred male 23.0 0 0 244278 10.5 S
401 400 1 2 Trout, Mrs. William H (Jessie L) female 28.0 0 0 240929 12.65 S
402 401 1 3 Niskanen, Mr. Juha male 39.0 0 0 STON/O 2. 3101289 7.925 S
403 402 0 3 Adams, Mr. John male 26.0 0 0 341826 8.05 S
404 403 0 3 Jussila, Miss. Mari Aina female 21.0 1 0 4137 9.825 S
405 404 0 3 Hakkarainen, Mr. Pekka Pietari male 28.0 1 0 STON/O2. 3101279 15.85 S
406 405 0 3 Oreskovic, Miss. Marija female 20.0 0 0 315096 8.6625 S
407 406 0 2 Gale, Mr. Shadrach male 34.0 1 0 28664 21.0 S
408 407 0 3 Widegren, Mr. Carl/Charles Peter male 51.0 0 0 347064 7.75 S
409 408 1 2 Richards, Master. William Rowe male 3.0 1 1 29106 18.75 S
410 409 0 3 Birkeland, Mr. Hans Martin Monsen male 21.0 0 0 312992 7.775 S
411 410 0 3 Lefebre, Miss. Ida female 29.69911764705882 3 1 4133 25.4667 S
412 411 0 3 Sdycoff, Mr. Todor male 29.69911764705882 0 0 349222 7.8958 S
413 412 0 3 Hart, Mr. Henry male 29.69911764705882 0 0 394140 6.8583 Q
414 413 1 1 Minahan, Miss. Daisy E female 33.0 1 0 19928 90.0 C78 Q
415 414 0 2 Cunningham, Mr. Alfred Fleming male 29.69911764705882 0 0 239853 0.0 S
416 415 1 3 Sundman, Mr. Johan Julian male 44.0 0 0 STON/O 2. 3101269 7.925 S
417 416 0 3 Meek, Mrs. Thomas (Annie Louise Rowley) female 29.69911764705882 0 0 343095 8.05 S
418 417 1 2 Drew, Mrs. James Vivian (Lulu Thorne Christian) female 34.0 1 1 28220 32.5 S
419 418 1 2 Silven, Miss. Lyyli Karoliina female 18.0 0 2 250652 13.0 S
420 419 0 2 Matthews, Mr. William John male 30.0 0 0 28228 13.0 S
421 420 0 3 Van Impe, Miss. Catharina female 10.0 0 2 345773 24.15 S
422 421 0 3 Gheorgheff, Mr. Stanio male 29.69911764705882 0 0 349254 7.8958 C
423 422 0 3 Charters, Mr. David male 21.0 0 0 A/5. 13032 7.7333 Q
424 423 0 3 Zimmerman, Mr. Leo male 29.0 0 0 315082 7.875 S
425 424 0 3 Danbom, Mrs. Ernst Gilbert (Anna Sigrid Maria Brogren) female 28.0 1 1 347080 14.4 S
426 425 0 3 Rosblom, Mr. Viktor Richard male 18.0 1 1 370129 20.2125 S
427 426 0 3 Wiseman, Mr. Phillippe male 29.69911764705882 0 0 A/4. 34244 7.25 S
428 427 1 2 Clarke, Mrs. Charles V (Ada Maria Winfield) female 28.0 1 0 2003 26.0 S
429 428 1 2 Phillips, Miss. Kate Florence ("Mrs Kate Louise Phillips Marshall") female 19.0 0 0 250655 26.0 S
430 429 0 3 Flynn, Mr. James male 29.69911764705882 0 0 364851 7.75 Q
431 430 1 3 Pickard, Mr. Berk (Berk Trembisky) male 32.0 0 0 SOTON/O.Q. 392078 8.05 E10 S
432 431 1 1 Bjornstrom-Steffansson, Mr. Mauritz Hakan male 28.0 0 0 110564 26.55 C52 S
433 432 1 3 Thorneycroft, Mrs. Percival (Florence Kate White) female 29.69911764705882 1 0 376564 16.1 S
434 433 1 2 Louch, Mrs. Charles Alexander (Alice Adelaide Slow) female 42.0 1 0 SC/AH 3085 26.0 S
435 434 0 3 Kallio, Mr. Nikolai Erland male 17.0 0 0 STON/O 2. 3101274 7.125 S
436 435 0 1 Silvey, Mr. William Baird male 50.0 1 0 13507 55.9 E44 S
437 436 1 1 Carter, Miss. Lucile Polk female 14.0 1 2 113760 120.0 B96 B98 S
438 437 0 3 Ford, Miss. Doolina Margaret "Daisy" female 21.0 2 2 W./C. 6608 34.375 S
439 438 1 2 Richards, Mrs. Sidney (Emily Hocking) female 24.0 2 3 29106 18.75 S
440 439 0 1 Fortune, Mr. Mark male 64.0 1 4 19950 263.0 C23 C25 C27 S
441 440 0 2 Kvillner, Mr. Johan Henrik Johannesson male 31.0 0 0 C.A. 18723 10.5 S
442 441 1 2 Hart, Mrs. Benjamin (Esther Ada Bloomfield) female 45.0 1 1 F.C.C. 13529 26.25 S
443 442 0 3 Hampe, Mr. Leon male 20.0 0 0 345769 9.5 S
444 443 0 3 Petterson, Mr. Johan Emil male 25.0 1 0 347076 7.775 S
445 444 1 2 Reynaldo, Ms. Encarnacion female 28.0 0 0 230434 13.0 S
446 445 1 3 Johannesen-Bratthammer, Mr. Bernt male 29.69911764705882 0 0 65306 8.1125 S
447 446 1 1 Dodge, Master. Washington male 4.0 0 2 33638 81.8583 A34 S
448 447 1 2 Mellinger, Miss. Madeleine Violet female 13.0 0 1 250644 19.5 S
449 448 1 1 Seward, Mr. Frederic Kimber male 34.0 0 0 113794 26.55 S
450 449 1 3 Baclini, Miss. Marie Catherine female 5.0 2 1 2666 19.2583 C
451 450 1 1 Peuchen, Major. Arthur Godfrey male 52.0 0 0 113786 30.5 C104 S
452 451 0 2 West, Mr. Edwy Arthur male 36.0 1 2 C.A. 34651 27.75 S
453 452 0 3 Hagland, Mr. Ingvald Olai Olsen male 29.69911764705882 1 0 65303 19.9667 S
454 453 0 1 Foreman, Mr. Benjamin Laventall male 30.0 0 0 113051 27.75 C111 C
455 454 1 1 Goldenberg, Mr. Samuel L male 49.0 1 0 17453 89.1042 C92 C
456 455 0 3 Peduzzi, Mr. Joseph male 29.69911764705882 0 0 A/5 2817 8.05 S
457 456 1 3 Jalsevac, Mr. Ivan male 29.0 0 0 349240 7.8958 C
458 457 0 1 Millet, Mr. Francis Davis male 65.0 0 0 13509 26.55 E38 S
459 458 1 1 Kenyon, Mrs. Frederick R (Marion) female 29.69911764705882 1 0 17464 51.8625 D21 S
460 459 1 2 Toomey, Miss. Ellen female 50.0 0 0 F.C.C. 13531 10.5 S
461 460 0 3 O'Connor, Mr. Maurice male 29.69911764705882 0 0 371060 7.75 Q
462 461 1 1 Anderson, Mr. Harry male 48.0 0 0 19952 26.55 E12 S
463 462 0 3 Morley, Mr. William male 34.0 0 0 364506 8.05 S
464 463 0 1 Gee, Mr. Arthur H male 47.0 0 0 111320 38.5 E63 S
465 464 0 2 Milling, Mr. Jacob Christian male 48.0 0 0 234360 13.0 S
466 465 0 3 Maisner, Mr. Simon male 29.69911764705882 0 0 A/S 2816 8.05 S
467 466 0 3 Goncalves, Mr. Manuel Estanslas male 38.0 0 0 SOTON/O.Q. 3101306 7.05 S
468 467 0 2 Campbell, Mr. William male 29.69911764705882 0 0 239853 0.0 S
469 468 0 1 Smart, Mr. John Montgomery male 56.0 0 0 113792 26.55 S
470 469 0 3 Scanlan, Mr. James male 29.69911764705882 0 0 36209 7.725 Q
471 470 1 3 Baclini, Miss. Helene Barbara female 0.75 2 1 2666 19.2583 C
472 471 0 3 Keefe, Mr. Arthur male 29.69911764705882 0 0 323592 7.25 S
473 472 0 3 Cacic, Mr. Luka male 38.0 0 0 315089 8.6625 S
474 473 1 2 West, Mrs. Edwy Arthur (Ada Mary Worth) female 33.0 1 2 C.A. 34651 27.75 S
475 474 1 2 Jerwan, Mrs. Amin S (Marie Marthe Thuillard) female 23.0 0 0 SC/AH Basle 541 13.7917 D C
476 475 0 3 Strandberg, Miss. Ida Sofia female 22.0 0 0 7553 9.8375 S
477 476 0 1 Clifford, Mr. George Quincy male 29.69911764705882 0 0 110465 52.0 A14 S
478 477 0 2 Renouf, Mr. Peter Henry male 34.0 1 0 31027 21.0 S
479 478 0 3 Braund, Mr. Lewis Richard male 29.0 1 0 3460 7.0458 S
480 479 0 3 Karlsson, Mr. Nils August male 22.0 0 0 350060 7.5208 S
481 480 1 3 Hirvonen, Miss. Hildur E female 2.0 0 1 3101298 12.2875 S
482 481 0 3 Goodwin, Master. Harold Victor male 9.0 5 2 CA 2144 46.9 S
483 482 0 2 Frost, Mr. Anthony Wood "Archie" male 29.69911764705882 0 0 239854 0.0 S
484 483 0 3 Rouse, Mr. Richard Henry male 50.0 0 0 A/5 3594 8.05 S
485 484 1 3 Turkula, Mrs. (Hedwig) female 63.0 0 0 4134 9.5875 S
486 485 1 1 Bishop, Mr. Dickinson H male 25.0 1 0 11967 91.0792 B49 C
487 486 0 3 Lefebre, Miss. Jeannie female 29.69911764705882 3 1 4133 25.4667 S
488 487 1 1 Hoyt, Mrs. Frederick Maxfield (Jane Anne Forby) female 35.0 1 0 19943 90.0 C93 S
489 488 0 1 Kent, Mr. Edward Austin male 58.0 0 0 11771 29.7 B37 C
490 489 0 3 Somerton, Mr. Francis William male 30.0 0 0 A.5. 18509 8.05 S
491 490 1 3 Coutts, Master. Eden Leslie "Neville" male 9.0 1 1 C.A. 37671 15.9 S
492 491 0 3 Hagland, Mr. Konrad Mathias Reiersen male 29.69911764705882 1 0 65304 19.9667 S
493 492 0 3 Windelov, Mr. Einar male 21.0 0 0 SOTON/OQ 3101317 7.25 S
494 493 0 1 Molson, Mr. Harry Markland male 55.0 0 0 113787 30.5 C30 S
495 494 0 1 Artagaveytia, Mr. Ramon male 71.0 0 0 PC 17609 49.5042 C
496 495 0 3 Stanley, Mr. Edward Roland male 21.0 0 0 A/4 45380 8.05 S
497 496 0 3 Yousseff, Mr. Gerious male 29.69911764705882 0 0 2627 14.4583 C
498 497 1 1 Eustis, Miss. Elizabeth Mussey female 54.0 1 0 36947 78.2667 D20 C
499 498 0 3 Shellard, Mr. Frederick William male 29.69911764705882 0 0 C.A. 6212 15.1 S
500 499 0 1 Allison, Mrs. Hudson J C (Bessie Waldo Daniels) female 25.0 1 2 113781 151.55 C22 C26 S
501 500 0 3 Svensson, Mr. Olof male 24.0 0 0 350035 7.7958 S
502 501 0 3 Calic, Mr. Petar male 17.0 0 0 315086 8.6625 S
503 502 0 3 Canavan, Miss. Mary female 21.0 0 0 364846 7.75 Q
504 503 0 3 O'Sullivan, Miss. Bridget Mary female 29.69911764705882 0 0 330909 7.6292 Q
505 504 0 3 Laitinen, Miss. Kristina Sofia female 37.0 0 0 4135 9.5875 S
506 505 1 1 Maioni, Miss. Roberta female 16.0 0 0 110152 86.5 B79 S
507 506 0 1 Penasco y Castellana, Mr. Victor de Satode male 18.0 1 0 PC 17758 108.9 C65 C
508 507 1 2 Quick, Mrs. Frederick Charles (Jane Richards) female 33.0 0 2 26360 26.0 S
509 508 1 1 Bradley, Mr. George ("George Arthur Brayton") male 29.69911764705882 0 0 111427 26.55 S
510 509 0 3 Olsen, Mr. Henry Margido male 28.0 0 0 C 4001 22.525 S
511 510 1 3 Lang, Mr. Fang male 26.0 0 0 1601 56.4958 S
512 511 1 3 Daly, Mr. Eugene Patrick male 29.0 0 0 382651 7.75 Q
513 512 0 3 Webber, Mr. James male 29.69911764705882 0 0 SOTON/OQ 3101316 8.05 S
514 513 1 1 McGough, Mr. James Robert male 36.0 0 0 PC 17473 26.2875 E25 S
515 514 1 1 Rothschild, Mrs. Martin (Elizabeth L. Barrett) female 54.0 1 0 PC 17603 59.4 C
516 515 0 3 Coleff, Mr. Satio male 24.0 0 0 349209 7.4958 S
517 516 0 1 Walker, Mr. William Anderson male 47.0 0 0 36967 34.0208 D46 S
518 517 1 2 Lemore, Mrs. (Amelia Milley) female 34.0 0 0 C.A. 34260 10.5 F33 S
519 518 0 3 Ryan, Mr. Patrick male 29.69911764705882 0 0 371110 24.15 Q
520 519 1 2 Angle, Mrs. William A (Florence "Mary" Agnes Hughes) female 36.0 1 0 226875 26.0 S
521 520 0 3 Pavlovic, Mr. Stefo male 32.0 0 0 349242 7.8958 S
522 521 1 1 Perreault, Miss. Anne female 30.0 0 0 12749 93.5 B73 S
523 522 0 3 Vovk, Mr. Janko male 22.0 0 0 349252 7.8958 S
524 523 0 3 Lahoud, Mr. Sarkis male 29.69911764705882 0 0 2624 7.225 C
525 524 1 1 Hippach, Mrs. Louis Albert (Ida Sophia Fischer) female 44.0 0 1 111361 57.9792 B18 C
526 525 0 3 Kassem, Mr. Fared male 29.69911764705882 0 0 2700 7.2292 C
527 526 0 3 Farrell, Mr. James male 40.5 0 0 367232 7.75 Q
528 527 1 2 Ridsdale, Miss. Lucy female 50.0 0 0 W./C. 14258 10.5 S
529 528 0 1 Farthing, Mr. John male 29.69911764705882 0 0 PC 17483 221.7792 C95 S
530 529 0 3 Salonen, Mr. Johan Werner male 39.0 0 0 3101296 7.925 S
531 530 0 2 Hocking, Mr. Richard George male 23.0 2 1 29104 11.5 S
532 531 1 2 Quick, Miss. Phyllis May female 2.0 1 1 26360 26.0 S
533 532 0 3 Toufik, Mr. Nakli male 29.69911764705882 0 0 2641 7.2292 C
534 533 0 3 Elias, Mr. Joseph Jr male 17.0 1 1 2690 7.2292 C
535 534 1 3 Peter, Mrs. Catherine (Catherine Rizk) female 29.69911764705882 0 2 2668 22.3583 C
536 535 0 3 Cacic, Miss. Marija female 30.0 0 0 315084 8.6625 S
537 536 1 2 Hart, Miss. Eva Miriam female 7.0 0 2 F.C.C. 13529 26.25 S
538 537 0 1 Butt, Major. Archibald Willingham male 45.0 0 0 113050 26.55 B38 S
539 538 1 1 LeRoy, Miss. Bertha female 30.0 0 0 PC 17761 106.425 C
540 539 0 3 Risien, Mr. Samuel Beard male 29.69911764705882 0 0 364498 14.5 S
541 540 1 1 Frolicher, Miss. Hedwig Margaritha female 22.0 0 2 13568 49.5 B39 C
542 541 1 1 Crosby, Miss. Harriet R female 36.0 0 2 WE/P 5735 71.0 B22 S
543 542 0 3 Andersson, Miss. Ingeborg Constanzia female 9.0 4 2 347082 31.275 S
544 543 0 3 Andersson, Miss. Sigrid Elisabeth female 11.0 4 2 347082 31.275 S
545 544 1 2 Beane, Mr. Edward male 32.0 1 0 2908 26.0 S
546 545 0 1 Douglas, Mr. Walter Donald male 50.0 1 0 PC 17761 106.425 C86 C
547 546 0 1 Nicholson, Mr. Arthur Ernest male 64.0 0 0 693 26.0 S
548 547 1 2 Beane, Mrs. Edward (Ethel Clarke) female 19.0 1 0 2908 26.0 S
549 548 1 2 Padro y Manent, Mr. Julian male 29.69911764705882 0 0 SC/PARIS 2146 13.8625 C
550 549 0 3 Goldsmith, Mr. Frank John male 33.0 1 1 363291 20.525 S
551 550 1 2 Davies, Master. John Morgan Jr male 8.0 1 1 C.A. 33112 36.75 S
552 551 1 1 Thayer, Mr. John Borland Jr male 17.0 0 2 17421 110.8833 C70 C
553 552 0 2 Sharp, Mr. Percival James R male 27.0 0 0 244358 26.0 S
554 553 0 3 O'Brien, Mr. Timothy male 29.69911764705882 0 0 330979 7.8292 Q
555 554 1 3 Leeni, Mr. Fahim ("Philip Zenni") male 22.0 0 0 2620 7.225 C
556 555 1 3 Ohman, Miss. Velin female 22.0 0 0 347085 7.775 S
557 556 0 1 Wright, Mr. George male 62.0 0 0 113807 26.55 S
558 557 1 1 Duff Gordon, Lady. (Lucille Christiana Sutherland) ("Mrs Morgan") female 48.0 1 0 11755 39.6 A16 C
559 558 0 1 Robbins, Mr. Victor male 29.69911764705882 0 0 PC 17757 227.525 C
560 559 1 1 Taussig, Mrs. Emil (Tillie Mandelbaum) female 39.0 1 1 110413 79.65 E67 S
561 560 1 3 de Messemaeker, Mrs. Guillaume Joseph (Emma) female 36.0 1 0 345572 17.4 S
562 561 0 3 Morrow, Mr. Thomas Rowan male 29.69911764705882 0 0 372622 7.75 Q
563 562 0 3 Sivic, Mr. Husein male 40.0 0 0 349251 7.8958 S
564 563 0 2 Norman, Mr. Robert Douglas male 28.0 0 0 218629 13.5 S
565 564 0 3 Simmons, Mr. John male 29.69911764705882 0 0 SOTON/OQ 392082 8.05 S
566 565 0 3 Meanwell, Miss. (Marion Ogden) female 29.69911764705882 0 0 SOTON/O.Q. 392087 8.05 S
567 566 0 3 Davies, Mr. Alfred J male 24.0 2 0 A/4 48871 24.15 S
568 567 0 3 Stoytcheff, Mr. Ilia male 19.0 0 0 349205 7.8958 S
569 568 0 3 Palsson, Mrs. Nils (Alma Cornelia Berglund) female 29.0 0 4 349909 21.075 S
570 569 0 3 Doharr, Mr. Tannous male 29.69911764705882 0 0 2686 7.2292 C
571 570 1 3 Jonsson, Mr. Carl male 32.0 0 0 350417 7.8542 S
572 571 1 2 Harris, Mr. George male 62.0 0 0 S.W./PP 752 10.5 S
573 572 1 1 Appleton, Mrs. Edward Dale (Charlotte Lamson) female 53.0 2 0 11769 51.4792 C101 S
574 573 1 1 Flynn, Mr. John Irwin ("Irving") male 36.0 0 0 PC 17474 26.3875 E25 S
575 574 1 3 Kelly, Miss. Mary female 29.69911764705882 0 0 14312 7.75 Q
576 575 0 3 Rush, Mr. Alfred George John male 16.0 0 0 A/4. 20589 8.05 S
577 576 0 3 Patchett, Mr. George male 19.0 0 0 358585 14.5 S
578 577 1 2 Garside, Miss. Ethel female 34.0 0 0 243880 13.0 S
579 578 1 1 Silvey, Mrs. William Baird (Alice Munger) female 39.0 1 0 13507 55.9 E44 S
580 579 0 3 Caram, Mrs. Joseph (Maria Elias) female 29.69911764705882 1 0 2689 14.4583 C
581 580 1 3 Jussila, Mr. Eiriik male 32.0 0 0 STON/O 2. 3101286 7.925 S
582 581 1 2 Christy, Miss. Julie Rachel female 25.0 1 1 237789 30.0 S
583 582 1 1 Thayer, Mrs. John Borland (Marian Longstreth Morris) female 39.0 1 1 17421 110.8833 C68 C
584 583 0 2 Downton, Mr. William James male 54.0 0 0 28403 26.0 S
585 584 0 1 Ross, Mr. John Hugo male 36.0 0 0 13049 40.125 A10 C
586 585 0 3 Paulner, Mr. Uscher male 29.69911764705882 0 0 3411 8.7125 C
587 586 1 1 Taussig, Miss. Ruth female 18.0 0 2 110413 79.65 E68 S
588 587 0 2 Jarvis, Mr. John Denzil male 47.0 0 0 237565 15.0 S
589 588 1 1 Frolicher-Stehli, Mr. Maxmillian male 60.0 1 1 13567 79.2 B41 C
590 589 0 3 Gilinski, Mr. Eliezer male 22.0 0 0 14973 8.05 S
591 590 0 3 Murdlin, Mr. Joseph male 29.69911764705882 0 0 A./5. 3235 8.05 S
592 591 0 3 Rintamaki, Mr. Matti male 35.0 0 0 STON/O 2. 3101273 7.125 S
593 592 1 1 Stephenson, Mrs. Walter Bertram (Martha Eustis) female 52.0 1 0 36947 78.2667 D20 C
594 593 0 3 Elsbury, Mr. William James male 47.0 0 0 A/5 3902 7.25 S
595 594 0 3 Bourke, Miss. Mary female 29.69911764705882 0 2 364848 7.75 Q
596 595 0 2 Chapman, Mr. John Henry male 37.0 1 0 SC/AH 29037 26.0 S
597 596 0 3 Van Impe, Mr. Jean Baptiste male 36.0 1 1 345773 24.15 S
598 597 1 2 Leitch, Miss. Jessie Wills female 29.69911764705882 0 0 248727 33.0 S
599 598 0 3 Johnson, Mr. Alfred male 49.0 0 0 LINE 0.0 S
600 599 0 3 Boulos, Mr. Hanna male 29.69911764705882 0 0 2664 7.225 C
601 600 1 1 Duff Gordon, Sir. Cosmo Edmund ("Mr Morgan") male 49.0 1 0 PC 17485 56.9292 A20 C
602 601 1 2 Jacobsohn, Mrs. Sidney Samuel (Amy Frances Christy) female 24.0 2 1 243847 27.0 S
603 602 0 3 Slabenoff, Mr. Petco male 29.69911764705882 0 0 349214 7.8958 S
604 603 0 1 Harrington, Mr. Charles H male 29.69911764705882 0 0 113796 42.4 S
605 604 0 3 Torber, Mr. Ernst William male 44.0 0 0 364511 8.05 S
606 605 1 1 Homer, Mr. Harry ("Mr E Haven") male 35.0 0 0 111426 26.55 C
607 606 0 3 Lindell, Mr. Edvard Bengtsson male 36.0 1 0 349910 15.55 S
608 607 0 3 Karaic, Mr. Milan male 30.0 0 0 349246 7.8958 S
609 608 1 1 Daniel, Mr. Robert Williams male 27.0 0 0 113804 30.5 S
610 609 1 2 Laroche, Mrs. Joseph (Juliette Marie Louise Lafargue) female 22.0 1 2 SC/Paris 2123 41.5792 C
611 610 1 1 Shutes, Miss. Elizabeth W female 40.0 0 0 PC 17582 153.4625 C125 S
612 611 0 3 Andersson, Mrs. Anders Johan (Alfrida Konstantia Brogren) female 39.0 1 5 347082 31.275 S
613 612 0 3 Jardin, Mr. Jose Neto male 29.69911764705882 0 0 SOTON/O.Q. 3101305 7.05 S
614 613 1 3 Murphy, Miss. Margaret Jane female 29.69911764705882 1 0 367230 15.5 Q
615 614 0 3 Horgan, Mr. John male 29.69911764705882 0 0 370377 7.75 Q
616 615 0 3 Brocklebank, Mr. William Alfred male 35.0 0 0 364512 8.05 S
617 616 1 2 Herman, Miss. Alice female 24.0 1 2 220845 65.0 S
618 617 0 3 Danbom, Mr. Ernst Gilbert male 34.0 1 1 347080 14.4 S
619 618 0 3 Lobb, Mrs. William Arthur (Cordelia K Stanlick) female 26.0 1 0 A/5. 3336 16.1 S
620 619 1 2 Becker, Miss. Marion Louise female 4.0 2 1 230136 39.0 F4 S
621 620 0 2 Gavey, Mr. Lawrence male 26.0 0 0 31028 10.5 S
622 621 0 3 Yasbeck, Mr. Antoni male 27.0 1 0 2659 14.4542 C
623 622 1 1 Kimball, Mr. Edwin Nelson Jr male 42.0 1 0 11753 52.5542 D19 S
624 623 1 3 Nakid, Mr. Sahid male 20.0 1 1 2653 15.7417 C
625 624 0 3 Hansen, Mr. Henry Damsgaard male 21.0 0 0 350029 7.8542 S
626 625 0 3 Bowen, Mr. David John "Dai" male 21.0 0 0 54636 16.1 S
627 626 0 1 Sutton, Mr. Frederick male 61.0 0 0 36963 32.3208 D50 S
628 627 0 2 Kirkland, Rev. Charles Leonard male 57.0 0 0 219533 12.35 Q
629 628 1 1 Longley, Miss. Gretchen Fiske female 21.0 0 0 13502 77.9583 D9 S
630 629 0 3 Bostandyeff, Mr. Guentcho male 26.0 0 0 349224 7.8958 S
631 630 0 3 O'Connell, Mr. Patrick D male 29.69911764705882 0 0 334912 7.7333 Q
632 631 1 1 Barkworth, Mr. Algernon Henry Wilson male 80.0 0 0 27042 30.0 A23 S
633 632 0 3 Lundahl, Mr. Johan Svensson male 51.0 0 0 347743 7.0542 S
634 633 1 1 Stahelin-Maeglin, Dr. Max male 32.0 0 0 13214 30.5 B50 C
635 634 0 1 Parr, Mr. William Henry Marsh male 29.69911764705882 0 0 112052 0.0 S
636 635 0 3 Skoog, Miss. Mabel female 9.0 3 2 347088 27.9 S
637 636 1 2 Davis, Miss. Mary female 28.0 0 0 237668 13.0 S
638 637 0 3 Leinonen, Mr. Antti Gustaf male 32.0 0 0 STON/O 2. 3101292 7.925 S
639 638 0 2 Collyer, Mr. Harvey male 31.0 1 1 C.A. 31921 26.25 S
640 639 0 3 Panula, Mrs. Juha (Maria Emilia Ojala) female 41.0 0 5 3101295 39.6875 S
641 640 0 3 Thorneycroft, Mr. Percival male 29.69911764705882 1 0 376564 16.1 S
642 641 0 3 Jensen, Mr. Hans Peder male 20.0 0 0 350050 7.8542 S
643 642 1 1 Sagesser, Mlle. Emma female 24.0 0 0 PC 17477 69.3 B35 C
644 643 0 3 Skoog, Miss. Margit Elizabeth female 2.0 3 2 347088 27.9 S
645 644 1 3 Foo, Mr. Choong male 29.69911764705882 0 0 1601 56.4958 S
646 645 1 3 Baclini, Miss. Eugenie female 0.75 2 1 2666 19.2583 C
647 646 1 1 Harper, Mr. Henry Sleeper male 48.0 1 0 PC 17572 76.7292 D33 C
648 647 0 3 Cor, Mr. Liudevit male 19.0 0 0 349231 7.8958 S
649 648 1 1 Simonius-Blumer, Col. Oberst Alfons male 56.0 0 0 13213 35.5 A26 C
650 649 0 3 Willey, Mr. Edward male 29.69911764705882 0 0 S.O./P.P. 751 7.55 S
651 650 1 3 Stanley, Miss. Amy Zillah Elsie female 23.0 0 0 CA. 2314 7.55 S
652 651 0 3 Mitkoff, Mr. Mito male 29.69911764705882 0 0 349221 7.8958 S
653 652 1 2 Doling, Miss. Elsie female 18.0 0 1 231919 23.0 S
654 653 0 3 Kalvik, Mr. Johannes Halvorsen male 21.0 0 0 8475 8.4333 S
655 654 1 3 O'Leary, Miss. Hanora "Norah" female 29.69911764705882 0 0 330919 7.8292 Q
656 655 0 3 Hegarty, Miss. Hanora "Nora" female 18.0 0 0 365226 6.75 Q
657 656 0 2 Hickman, Mr. Leonard Mark male 24.0 2 0 S.O.C. 14879 73.5 S
658 657 0 3 Radeff, Mr. Alexander male 29.69911764705882 0 0 349223 7.8958 S
659 658 0 3 Bourke, Mrs. John (Catherine) female 32.0 1 1 364849 15.5 Q
660 659 0 2 Eitemiller, Mr. George Floyd male 23.0 0 0 29751 13.0 S
661 660 0 1 Newell, Mr. Arthur Webster male 58.0 0 2 35273 113.275 D48 C
662 661 1 1 Frauenthal, Dr. Henry William male 50.0 2 0 PC 17611 133.65 S
663 662 0 3 Badt, Mr. Mohamed male 40.0 0 0 2623 7.225 C
664 663 0 1 Colley, Mr. Edward Pomeroy male 47.0 0 0 5727 25.5875 E58 S
665 664 0 3 Coleff, Mr. Peju male 36.0 0 0 349210 7.4958 S
666 665 1 3 Lindqvist, Mr. Eino William male 20.0 1 0 STON/O 2. 3101285 7.925 S
667 666 0 2 Hickman, Mr. Lewis male 32.0 2 0 S.O.C. 14879 73.5 S
668 667 0 2 Butler, Mr. Reginald Fenton male 25.0 0 0 234686 13.0 S
669 668 0 3 Rommetvedt, Mr. Knud Paust male 29.69911764705882 0 0 312993 7.775 S
670 669 0 3 Cook, Mr. Jacob male 43.0 0 0 A/5 3536 8.05 S
671 670 1 1 Taylor, Mrs. Elmer Zebley (Juliet Cummins Wright) female 29.69911764705882 1 0 19996 52.0 C126 S
672 671 1 2 Brown, Mrs. Thomas William Solomon (Elizabeth Catherine Ford) female 40.0 1 1 29750 39.0 S
673 672 0 1 Davidson, Mr. Thornton male 31.0 1 0 F.C. 12750 52.0 B71 S
674 673 0 2 Mitchell, Mr. Henry Michael male 70.0 0 0 C.A. 24580 10.5 S
675 674 1 2 Wilhelms, Mr. Charles male 31.0 0 0 244270 13.0 S
676 675 0 2 Watson, Mr. Ennis Hastings male 29.69911764705882 0 0 239856 0.0 S
677 676 0 3 Edvardsson, Mr. Gustaf Hjalmar male 18.0 0 0 349912 7.775 S
678 677 0 3 Sawyer, Mr. Frederick Charles male 24.5 0 0 342826 8.05 S
679 678 1 3 Turja, Miss. Anna Sofia female 18.0 0 0 4138 9.8417 S
680 679 0 3 Goodwin, Mrs. Frederick (Augusta Tyler) female 43.0 1 6 CA 2144 46.9 S
681 680 1 1 Cardeza, Mr. Thomas Drake Martinez male 36.0 0 1 PC 17755 512.3292 B51 B53 B55 C
682 681 0 3 Peters, Miss. Katie female 29.69911764705882 0 0 330935 8.1375 Q
683 682 1 1 Hassab, Mr. Hammad male 27.0 0 0 PC 17572 76.7292 D49 C
684 683 0 3 Olsvigen, Mr. Thor Anderson male 20.0 0 0 6563 9.225 S
685 684 0 3 Goodwin, Mr. Charles Edward male 14.0 5 2 CA 2144 46.9 S
686 685 0 2 Brown, Mr. Thomas William Solomon male 60.0 1 1 29750 39.0 S
687 686 0 2 Laroche, Mr. Joseph Philippe Lemercier male 25.0 1 2 SC/Paris 2123 41.5792 C
688 687 0 3 Panula, Mr. Jaako Arnold male 14.0 4 1 3101295 39.6875 S
689 688 0 3 Dakic, Mr. Branko male 19.0 0 0 349228 10.1708 S
690 689 0 3 Fischer, Mr. Eberhard Thelander male 18.0 0 0 350036 7.7958 S
691 690 1 1 Madill, Miss. Georgette Alexandra female 15.0 0 1 24160 211.3375 B5 S
692 691 1 1 Dick, Mr. Albert Adrian male 31.0 1 0 17474 57.0 B20 S
693 692 1 3 Karun, Miss. Manca female 4.0 0 1 349256 13.4167 C
694 693 1 3 Lam, Mr. Ali male 29.69911764705882 0 0 1601 56.4958 S
695 694 0 3 Saad, Mr. Khalil male 25.0 0 0 2672 7.225 C
696 695 0 1 Weir, Col. John male 60.0 0 0 113800 26.55 S
697 696 0 2 Chapman, Mr. Charles Henry male 52.0 0 0 248731 13.5 S
698 697 0 3 Kelly, Mr. James male 44.0 0 0 363592 8.05 S
699 698 1 3 Mullens, Miss. Katherine "Katie" female 29.69911764705882 0 0 35852 7.7333 Q
700 699 0 1 Thayer, Mr. John Borland male 49.0 1 1 17421 110.8833 C68 C
701 700 0 3 Humblen, Mr. Adolf Mathias Nicolai Olsen male 42.0 0 0 348121 7.65 F G63 S
702 701 1 1 Astor, Mrs. John Jacob (Madeleine Talmadge Force) female 18.0 1 0 PC 17757 227.525 C62 C64 C
703 702 1 1 Silverthorne, Mr. Spencer Victor male 35.0 0 0 PC 17475 26.2875 E24 S
704 703 0 3 Barbara, Miss. Saiide female 18.0 0 1 2691 14.4542 C
705 704 0 3 Gallagher, Mr. Martin male 25.0 0 0 36864 7.7417 Q
706 705 0 3 Hansen, Mr. Henrik Juul male 26.0 1 0 350025 7.8542 S
707 706 0 2 Morley, Mr. Henry Samuel ("Mr Henry Marshall") male 39.0 0 0 250655 26.0 S
708 707 1 2 Kelly, Mrs. Florence "Fannie" female 45.0 0 0 223596 13.5 S
709 708 1 1 Calderhead, Mr. Edward Pennington male 42.0 0 0 PC 17476 26.2875 E24 S
710 709 1 1 Cleaver, Miss. Alice female 22.0 0 0 113781 151.55 S
711 710 1 3 Moubarek, Master. Halim Gonios ("William George") male 29.69911764705882 1 1 2661 15.2458 C
712 711 1 1 Mayne, Mlle. Berthe Antonine ("Mrs de Villiers") female 24.0 0 0 PC 17482 49.5042 C90 C
713 712 0 1 Klaber, Mr. Herman male 29.69911764705882 0 0 113028 26.55 C124 S
714 713 1 1 Taylor, Mr. Elmer Zebley male 48.0 1 0 19996 52.0 C126 S
715 714 0 3 Larsson, Mr. August Viktor male 29.0 0 0 7545 9.4833 S
716 715 0 2 Greenberg, Mr. Samuel male 52.0 0 0 250647 13.0 S
717 716 0 3 Soholt, Mr. Peter Andreas Lauritz Andersen male 19.0 0 0 348124 7.65 F G73 S
718 717 1 1 Endres, Miss. Caroline Louise female 38.0 0 0 PC 17757 227.525 C45 C
719 718 1 2 Troutt, Miss. Edwina Celia "Winnie" female 27.0 0 0 34218 10.5 E101 S
720 719 0 3 McEvoy, Mr. Michael male 29.69911764705882 0 0 36568 15.5 Q
721 720 0 3 Johnson, Mr. Malkolm Joackim male 33.0 0 0 347062 7.775 S
722 721 1 2 Harper, Miss. Annie Jessie "Nina" female 6.0 0 1 248727 33.0 S
723 722 0 3 Jensen, Mr. Svend Lauritz male 17.0 1 0 350048 7.0542 S
724 723 0 2 Gillespie, Mr. William Henry male 34.0 0 0 12233 13.0 S
725 724 0 2 Hodges, Mr. Henry Price male 50.0 0 0 250643 13.0 S
726 725 1 1 Chambers, Mr. Norman Campbell male 27.0 1 0 113806 53.1 E8 S
727 726 0 3 Oreskovic, Mr. Luka male 20.0 0 0 315094 8.6625 S
728 727 1 2 Renouf, Mrs. Peter Henry (Lillian Jefferys) female 30.0 3 0 31027 21.0 S
729 728 1 3 Mannion, Miss. Margareth female 29.69911764705882 0 0 36866 7.7375 Q
730 729 0 2 Bryhl, Mr. Kurt Arnold Gottfrid male 25.0 1 0 236853 26.0 S
731 730 0 3 Ilmakangas, Miss. Pieta Sofia female 25.0 1 0 STON/O2. 3101271 7.925 S
732 731 1 1 Allen, Miss. Elisabeth Walton female 29.0 0 0 24160 211.3375 B5 S
733 732 0 3 Hassan, Mr. Houssein G N male 11.0 0 0 2699 18.7875 C
734 733 0 2 Knight, Mr. Robert J male 29.69911764705882 0 0 239855 0.0 S
735 734 0 2 Berriman, Mr. William John male 23.0 0 0 28425 13.0 S
736 735 0 2 Troupiansky, Mr. Moses Aaron male 23.0 0 0 233639 13.0 S
737 736 0 3 Williams, Mr. Leslie male 28.5 0 0 54636 16.1 S
738 737 0 3 Ford, Mrs. Edward (Margaret Ann Watson) female 48.0 1 3 W./C. 6608 34.375 S
739 738 1 1 Lesurer, Mr. Gustave J male 35.0 0 0 PC 17755 512.3292 B101 C
740 739 0 3 Ivanoff, Mr. Kanio male 29.69911764705882 0 0 349201 7.8958 S
741 740 0 3 Nankoff, Mr. Minko male 29.69911764705882 0 0 349218 7.8958 S
742 741 1 1 Hawksford, Mr. Walter James male 29.69911764705882 0 0 16988 30.0 D45 S
743 742 0 1 Cavendish, Mr. Tyrell William male 36.0 1 0 19877 78.85 C46 S
744 743 1 1 Ryerson, Miss. Susan Parker "Suzette" female 21.0 2 2 PC 17608 262.375 B57 B59 B63 B66 C
745 744 0 3 McNamee, Mr. Neal male 24.0 1 0 376566 16.1 S
746 745 1 3 Stranden, Mr. Juho male 31.0 0 0 STON/O 2. 3101288 7.925 S
747 746 0 1 Crosby, Capt. Edward Gifford male 70.0 1 1 WE/P 5735 71.0 B22 S
748 747 0 3 Abbott, Mr. Rossmore Edward male 16.0 1 1 C.A. 2673 20.25 S
749 748 1 2 Sinkkonen, Miss. Anna female 30.0 0 0 250648 13.0 S
750 749 0 1 Marvin, Mr. Daniel Warner male 19.0 1 0 113773 53.1 D30 S
751 750 0 3 Connaghton, Mr. Michael male 31.0 0 0 335097 7.75 Q
752 751 1 2 Wells, Miss. Joan female 4.0 1 1 29103 23.0 S
753 752 1 3 Moor, Master. Meier male 6.0 0 1 392096 12.475 E121 S
754 753 0 3 Vande Velde, Mr. Johannes Joseph male 33.0 0 0 345780 9.5 S
755 754 0 3 Jonkoff, Mr. Lalio male 23.0 0 0 349204 7.8958 S
756 755 1 2 Herman, Mrs. Samuel (Jane Laver) female 48.0 1 2 220845 65.0 S
757 756 1 2 Hamalainen, Master. Viljo male 0.67 1 1 250649 14.5 S
758 757 0 3 Carlsson, Mr. August Sigfrid male 28.0 0 0 350042 7.7958 S
759 758 0 2 Bailey, Mr. Percy Andrew male 18.0 0 0 29108 11.5 S
760 759 0 3 Theobald, Mr. Thomas Leonard male 34.0 0 0 363294 8.05 S
761 760 1 1 Rothes, the Countess. of (Lucy Noel Martha Dyer-Edwards) female 33.0 0 0 110152 86.5 B77 S
762 761 0 3 Garfirth, Mr. John male 29.69911764705882 0 0 358585 14.5 S
763 762 0 3 Nirva, Mr. Iisakki Antino Aijo male 41.0 0 0 SOTON/O2 3101272 7.125 S
764 763 1 3 Barah, Mr. Hanna Assi male 20.0 0 0 2663 7.2292 C
765 764 1 1 Carter, Mrs. William Ernest (Lucile Polk) female 36.0 1 2 113760 120.0 B96 B98 S
766 765 0 3 Eklund, Mr. Hans Linus male 16.0 0 0 347074 7.775 S
767 766 1 1 Hogeboom, Mrs. John C (Anna Andrews) female 51.0 1 0 13502 77.9583 D11 S
768 767 0 1 Brewe, Dr. Arthur Jackson male 29.69911764705882 0 0 112379 39.6 C
769 768 0 3 Mangan, Miss. Mary female 30.5 0 0 364850 7.75 Q
770 769 0 3 Moran, Mr. Daniel J male 29.69911764705882 1 0 371110 24.15 Q
771 770 0 3 Gronnestad, Mr. Daniel Danielsen male 32.0 0 0 8471 8.3625 S
772 771 0 3 Lievens, Mr. Rene Aime male 24.0 0 0 345781 9.5 S
773 772 0 3 Jensen, Mr. Niels Peder male 48.0 0 0 350047 7.8542 S
774 773 0 2 Mack, Mrs. (Mary) female 57.0 0 0 S.O./P.P. 3 10.5 E77 S
775 774 0 3 Elias, Mr. Dibo male 29.69911764705882 0 0 2674 7.225 C
776 775 1 2 Hocking, Mrs. Elizabeth (Eliza Needs) female 54.0 1 3 29105 23.0 S
777 776 0 3 Myhrman, Mr. Pehr Fabian Oliver Malkolm male 18.0 0 0 347078 7.75 S
778 777 0 3 Tobin, Mr. Roger male 29.69911764705882 0 0 383121 7.75 F38 Q
779 778 1 3 Emanuel, Miss. Virginia Ethel female 5.0 0 0 364516 12.475 S
780 779 0 3 Kilgannon, Mr. Thomas J male 29.69911764705882 0 0 36865 7.7375 Q
781 780 1 1 Robert, Mrs. Edward Scott (Elisabeth Walton McMillan) female 43.0 0 1 24160 211.3375 B3 S
782 781 1 3 Ayoub, Miss. Banoura female 13.0 0 0 2687 7.2292 C
783 782 1 1 Dick, Mrs. Albert Adrian (Vera Gillespie) female 17.0 1 0 17474 57.0 B20 S
784 783 0 1 Long, Mr. Milton Clyde male 29.0 0 0 113501 30.0 D6 S
785 784 0 3 Johnston, Mr. Andrew G male 29.69911764705882 1 2 W./C. 6607 23.45 S
786 785 0 3 Ali, Mr. William male 25.0 0 0 SOTON/O.Q. 3101312 7.05 S
787 786 0 3 Harmer, Mr. Abraham (David Lishin) male 25.0 0 0 374887 7.25 S
788 787 1 3 Sjoblom, Miss. Anna Sofia female 18.0 0 0 3101265 7.4958 S
789 788 0 3 Rice, Master. George Hugh male 8.0 4 1 382652 29.125 Q
790 789 1 3 Dean, Master. Bertram Vere male 1.0 1 2 C.A. 2315 20.575 S
791 790 0 1 Guggenheim, Mr. Benjamin male 46.0 0 0 PC 17593 79.2 B82 B84 C
792 791 0 3 Keane, Mr. Andrew "Andy" male 29.69911764705882 0 0 12460 7.75 Q
793 792 0 2 Gaskell, Mr. Alfred male 16.0 0 0 239865 26.0 S
794 793 0 3 Sage, Miss. Stella Anna female 29.69911764705882 8 2 CA. 2343 69.55 S
795 794 0 1 Hoyt, Mr. William Fisher male 29.69911764705882 0 0 PC 17600 30.6958 C
796 795 0 3 Dantcheff, Mr. Ristiu male 25.0 0 0 349203 7.8958 S
797 796 0 2 Otter, Mr. Richard male 39.0 0 0 28213 13.0 S
798 797 1 1 Leader, Dr. Alice (Farnham) female 49.0 0 0 17465 25.9292 D17 S
799 798 1 3 Osman, Mrs. Mara female 31.0 0 0 349244 8.6833 S
800 799 0 3 Ibrahim Shawah, Mr. Yousseff male 30.0 0 0 2685 7.2292 C
801 800 0 3 Van Impe, Mrs. Jean Baptiste (Rosalie Paula Govaert) female 30.0 1 1 345773 24.15 S
802 801 0 2 Ponesell, Mr. Martin male 34.0 0 0 250647 13.0 S
803 802 1 2 Collyer, Mrs. Harvey (Charlotte Annie Tate) female 31.0 1 1 C.A. 31921 26.25 S
804 803 1 1 Carter, Master. William Thornton II male 11.0 1 2 113760 120.0 B96 B98 S
805 804 1 3 Thomas, Master. Assad Alexander male 0.42 0 1 2625 8.5167 C
806 805 1 3 Hedman, Mr. Oskar Arvid male 27.0 0 0 347089 6.975 S
807 806 0 3 Johansson, Mr. Karl Johan male 31.0 0 0 347063 7.775 S
808 807 0 1 Andrews, Mr. Thomas Jr male 39.0 0 0 112050 0.0 A36 S
809 808 0 3 Pettersson, Miss. Ellen Natalia female 18.0 0 0 347087 7.775 S
810 809 0 2 Meyer, Mr. August male 39.0 0 0 248723 13.0 S
811 810 1 1 Chambers, Mrs. Norman Campbell (Bertha Griggs) female 33.0 1 0 113806 53.1 E8 S
812 811 0 3 Alexander, Mr. William male 26.0 0 0 3474 7.8875 S
813 812 0 3 Lester, Mr. James male 39.0 0 0 A/4 48871 24.15 S
814 813 0 2 Slemen, Mr. Richard James male 35.0 0 0 28206 10.5 S
815 814 0 3 Andersson, Miss. Ebba Iris Alfrida female 6.0 4 2 347082 31.275 S
816 815 0 3 Tomlin, Mr. Ernest Portage male 30.5 0 0 364499 8.05 S
817 816 0 1 Fry, Mr. Richard male 29.69911764705882 0 0 112058 0.0 B102 S
818 817 0 3 Heininen, Miss. Wendla Maria female 23.0 0 0 STON/O2. 3101290 7.925 S
819 818 0 2 Mallet, Mr. Albert male 31.0 1 1 S.C./PARIS 2079 37.0042 C
820 819 0 3 Holm, Mr. John Fredrik Alexander male 43.0 0 0 C 7075 6.45 S
821 820 0 3 Skoog, Master. Karl Thorsten male 10.0 3 2 347088 27.9 S
822 821 1 1 Hays, Mrs. Charles Melville (Clara Jennings Gregg) female 52.0 1 1 12749 93.5 B69 S
823 822 1 3 Lulic, Mr. Nikola male 27.0 0 0 315098 8.6625 S
824 823 0 1 Reuchlin, Jonkheer. John George male 38.0 0 0 19972 0.0 S
825 824 1 3 Moor, Mrs. (Beila) female 27.0 0 1 392096 12.475 E121 S
826 825 0 3 Panula, Master. Urho Abraham male 2.0 4 1 3101295 39.6875 S
827 826 0 3 Flynn, Mr. John male 29.69911764705882 0 0 368323 6.95 Q
828 827 0 3 Lam, Mr. Len male 29.69911764705882 0 0 1601 56.4958 S
829 828 1 2 Mallet, Master. Andre male 1.0 0 2 S.C./PARIS 2079 37.0042 C
830 829 1 3 McCormack, Mr. Thomas Joseph male 29.69911764705882 0 0 367228 7.75 Q
831 830 1 1 Stone, Mrs. George Nelson (Martha Evelyn) female 62.0 0 0 113572 80.0 B28
832 831 1 3 Yasbeck, Mrs. Antoni (Selini Alexander) female 15.0 1 0 2659 14.4542 C
833 832 1 2 Richards, Master. George Sibley male 0.83 1 1 29106 18.75 S
834 833 0 3 Saad, Mr. Amin male 29.69911764705882 0 0 2671 7.2292 C
835 834 0 3 Augustsson, Mr. Albert male 23.0 0 0 347468 7.8542 S
836 835 0 3 Allum, Mr. Owen George male 18.0 0 0 2223 8.3 S
837 836 1 1 Compton, Miss. Sara Rebecca female 39.0 1 1 PC 17756 83.1583 E49 C
838 837 0 3 Pasic, Mr. Jakob male 21.0 0 0 315097 8.6625 S
839 838 0 3 Sirota, Mr. Maurice male 29.69911764705882 0 0 392092 8.05 S
840 839 1 3 Chip, Mr. Chang male 32.0 0 0 1601 56.4958 S
841 840 1 1 Marechal, Mr. Pierre male 29.69911764705882 0 0 11774 29.7 C47 C
842 841 0 3 Alhomaki, Mr. Ilmari Rudolf male 20.0 0 0 SOTON/O2 3101287 7.925 S
843 842 0 2 Mudd, Mr. Thomas Charles male 16.0 0 0 S.O./P.P. 3 10.5 S
844 843 1 1 Serepeca, Miss. Augusta female 30.0 0 0 113798 31.0 C
845 844 0 3 Lemberopolous, Mr. Peter L male 34.5 0 0 2683 6.4375 C
846 845 0 3 Culumovic, Mr. Jeso male 17.0 0 0 315090 8.6625 S
847 846 0 3 Abbing, Mr. Anthony male 42.0 0 0 C.A. 5547 7.55 S
848 847 0 3 Sage, Mr. Douglas Bullen male 29.69911764705882 8 2 CA. 2343 69.55 S
849 848 0 3 Markoff, Mr. Marin male 35.0 0 0 349213 7.8958 C
850 849 0 2 Harper, Rev. John male 28.0 0 1 248727 33.0 S
851 850 1 1 Goldenberg, Mrs. Samuel L (Edwiga Grabowska) female 29.69911764705882 1 0 17453 89.1042 C92 C
852 851 0 3 Andersson, Master. Sigvard Harald Elias male 4.0 4 2 347082 31.275 S
853 852 0 3 Svensson, Mr. Johan male 74.0 0 0 347060 7.775 S
854 853 0 3 Boulos, Miss. Nourelain female 9.0 1 1 2678 15.2458 C
855 854 1 1 Lines, Miss. Mary Conover female 16.0 0 1 PC 17592 39.4 D28 S
856 855 0 2 Carter, Mrs. Ernest Courtenay (Lilian Hughes) female 44.0 1 0 244252 26.0 S
857 856 1 3 Aks, Mrs. Sam (Leah Rosen) female 18.0 0 1 392091 9.35 S
858 857 1 1 Wick, Mrs. George Dennick (Mary Hitchcock) female 45.0 1 1 36928 164.8667 S
859 858 1 1 Daly, Mr. Peter Denis male 51.0 0 0 113055 26.55 E17 S
860 859 1 3 Baclini, Mrs. Solomon (Latifa Qurban) female 24.0 0 3 2666 19.2583 C
861 860 0 3 Razi, Mr. Raihed male 29.69911764705882 0 0 2629 7.2292 C
862 861 0 3 Hansen, Mr. Claus Peter male 41.0 2 0 350026 14.1083 S
863 862 0 2 Giles, Mr. Frederick Edward male 21.0 1 0 28134 11.5 S
864 863 1 1 Swift, Mrs. Frederick Joel (Margaret Welles Barron) female 48.0 0 0 17466 25.9292 D17 S
865 864 0 3 Sage, Miss. Dorothy Edith "Dolly" female 29.69911764705882 8 2 CA. 2343 69.55 S
866 865 0 2 Gill, Mr. John William male 24.0 0 0 233866 13.0 S
867 866 1 2 Bystrom, Mrs. (Karolina) female 42.0 0 0 236852 13.0 S
868 867 1 2 Duran y More, Miss. Asuncion female 27.0 1 0 SC/PARIS 2149 13.8583 C
869 868 0 1 Roebling, Mr. Washington Augustus II male 31.0 0 0 PC 17590 50.4958 A24 S
870 869 0 3 van Melkebeke, Mr. Philemon male 29.69911764705882 0 0 345777 9.5 S
871 870 1 3 Johnson, Master. Harold Theodor male 4.0 1 1 347742 11.1333 S
872 871 0 3 Balkic, Mr. Cerin male 26.0 0 0 349248 7.8958 S
873 872 1 1 Beckwith, Mrs. Richard Leonard (Sallie Monypeny) female 47.0 1 1 11751 52.5542 D35 S
874 873 0 1 Carlsson, Mr. Frans Olof male 33.0 0 0 695 5.0 B51 B53 B55 S
875 874 0 3 Vander Cruyssen, Mr. Victor male 47.0 0 0 345765 9.0 S
876 875 1 2 Abelson, Mrs. Samuel (Hannah Wizosky) female 28.0 1 0 P/PP 3381 24.0 C
877 876 1 3 Najib, Miss. Adele Kiamie "Jane" female 15.0 0 0 2667 7.225 C
878 877 0 3 Gustafsson, Mr. Alfred Ossian male 20.0 0 0 7534 9.8458 S
879 878 0 3 Petroff, Mr. Nedelio male 19.0 0 0 349212 7.8958 S
880 879 0 3 Laleff, Mr. Kristo male 29.69911764705882 0 0 349217 7.8958 S
881 880 1 1 Potter, Mrs. Thomas Jr (Lily Alexenia Wilson) female 56.0 0 1 11767 83.1583 C50 C
882 881 1 2 Shelley, Mrs. William (Imanita Parrish Hall) female 25.0 0 1 230433 26.0 S
883 882 0 3 Markun, Mr. Johann male 33.0 0 0 349257 7.8958 S
884 883 0 3 Dahlberg, Miss. Gerda Ulrika female 22.0 0 0 7552 10.5167 S
885 884 0 2 Banfield, Mr. Frederick James male 28.0 0 0 C.A./SOTON 34068 10.5 S
886 885 0 3 Sutehall, Mr. Henry Jr male 25.0 0 0 SOTON/OQ 392076 7.05 S
887 886 0 3 Rice, Mrs. William (Margaret Norton) female 39.0 0 5 382652 29.125 Q
888 887 0 2 Montvila, Rev. Juozas male 27.0 0 0 211536 13.0 S
889 888 1 1 Graham, Miss. Margaret Edith female 19.0 0 0 112053 30.0 B42 S
890 889 0 3 Johnston, Miss. Catherine Helen "Carrie" female 29.69911764705882 1 2 W./C. 6607 23.45 S
891 890 1 1 Behr, Mr. Karl Howell male 26.0 0 0 111369 30.0 C148 C
892 891 0 3 Dooley, Mr. Patrick male 32.0 0 0 370376 7.75 Q

View File

@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "984a8fca",
"metadata": {},
@@ -9,7 +10,7 @@
"\n",
"Sometimes, for complex calculations, rather than have an LLM generate the answer directly, it can be better to have the LLM generate code to calculate the answer, and then run that code to get the answer. In order to easily do that, we provide a simple Python REPL to execute commands in.\n",
"\n",
"This interface will only return things that are printed - therefor, if you want to use it to calculate an answer, make sure to have it print out the answer."
"This interface will only return things that are printed - therefore, if you want to use it to calculate an answer, make sure to have it print out the answer."
]
},
{

View File

@@ -0,0 +1,107 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "dc23c48e",
"metadata": {},
"source": [
"# Twilio\n",
"\n",
"This notebook goes over how to use the [Twilio](https://www.twilio.com) API wrapper to send a text message."
]
},
{
"cell_type": "markdown",
"id": "c1a33b13",
"metadata": {},
"source": [
"## Setup\n",
"\n",
"To use this tool you need to install the Python Twilio package `twilio`"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "98b544b9",
"metadata": {},
"outputs": [],
"source": [
"# !pip install twilio"
]
},
{
"cell_type": "markdown",
"id": "f7e883ae",
"metadata": {},
"source": [
"You'll also need to set up a Twilio account and get your credentials. You'll need your Account String Identifier (SID) and your Auth Token. You'll also need a number to send messages from.\n",
"\n",
"You can either pass these in to the TwilioAPIWrapper as named parameters `account_sid`, `auth_token`, `from_number`, or you can set the environment variables `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, `TWILIO_FROM_NUMBER`."
]
},
{
"cell_type": "markdown",
"id": "36c133be",
"metadata": {},
"source": [
"## Sending a message"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "54bf5afd",
"metadata": {},
"outputs": [],
"source": [
"from langchain.utilities.twilio import TwilioAPIWrapper"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "31f8f382",
"metadata": {},
"outputs": [],
"source": [
"twilio = TwilioAPIWrapper(\n",
"# account_sid=\"foo\",\n",
"# auth_token=\"bar\",\n",
"# from_number=\"baz,\"\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5009d763",
"metadata": {},
"outputs": [],
"source": [
"twilio.run(\"hello world\", \"+16162904619\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

Some files were not shown because too many files have changed in this diff Show More