Skip to content

Commit df307d0

Browse files
Merge pull request #3 from LangChain-OpenTutorial/soo-dev
🚚 move and new setting sample folder
2 parents 310e21b + d83f2a6 commit df307d0

12 files changed

+1008
-73
lines changed

sample/04-Model/06-GoogleGenerativeAI.ipynb

+522
Large diffs are not rendered by default.

sample/04-Model/07-Huggingface-Endpoints.ipynb

+482
Large diffs are not rendered by default.
Loading
Loading
Loading
Binary file not shown.

sample/New-05-GoogleGenerativeAI.md renamed to sample/old_version/05-GoogleGenerativeAI-(NEW).md

+2-12
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pre {
1414
background-color: #027c7c;
1515
padding-left: 0.5em;
1616
}
17+
1718
</style>
1819

1920
# Google Generative AI
@@ -52,13 +53,11 @@ Set up the environment. You may refer to [Environment Setup](https://wikidocs.ne
5253
- `langchain-opentutorial` is a package that provides a set of easy-to-use environment setup, useful functions and utilities for tutorials.
5354
- You can checkout the [`langchain-opentutorial`](https://github.com/LangChain-OpenTutorial/langchain-opentutorial-pypi) for more details.
5455

55-
5656
```python
5757
%%capture --no-stderr
5858
!pip install langchain-opentutorial
5959
```
6060

61-
6261
```python
6362
# Install required packages
6463
from langchain_opentutorial import package
@@ -73,7 +72,6 @@ package.install(
7372
)
7473
```
7574

76-
7775
```python
7876
# Set environment variables
7977
from langchain_opentutorial import set_env
@@ -101,7 +99,6 @@ You can alternatively set `GOOGLE_API_KEY` in `.env` file and load it.
10199

102100
[Note] This is not necessary if you've already set `GOOGLE_API_KEY` in previous steps.
103101

104-
105102
```python
106103
from dotenv import load_dotenv
107104

@@ -125,7 +122,6 @@ Because the `ChatGoogleGenerativeAI` class is integrated with the LangChain fram
125122

126123
For information about supported models, see: https://ai.google.dev/gemini-api/docs/models/gemini?hl=en
127124

128-
129125
```python
130126
from langchain_google_genai import ChatGoogleGenerativeAI
131127

@@ -143,7 +139,6 @@ for token in answer:
143139
LangChain is a framework for developing applications powered by large language models (LLMs). It simplifies building applications by connecting LLMs to other sources of data and computation. This enables creation of sophisticated chains of prompts and actions, going beyond single LLM calls.
144140

145141

146-
147142
```python
148143
from langchain_google_genai import ChatGoogleGenerativeAI
149144
from langchain_core.prompts import PromptTemplate
@@ -170,7 +165,6 @@ print(response.content)
170165

171166
Gemini models have default safety settings that can be overridden. If you are receiving lots of "Safety Warnings" from your models, you can try tweaking the `safety_settings` attribute of the model. For example, to turn off safety blocking for dangerous content, you can construct your LLM as follows:
172167

173-
174168
```python
175169
from langchain_google_genai import (
176170
ChatGoogleGenerativeAI,
@@ -242,7 +236,6 @@ print(response.content)
242236

243237
`ChatGoogleGenerativeAI` natively supports streaming and batching. Below is an example.
244238

245-
246239
```python
247240
from langchain_google_genai import ChatGoogleGenerativeAI
248241

@@ -289,7 +282,6 @@ for chunk in llm.stream("Can you recommend 5 travel destinations in California?"
289282
---
290283

291284

292-
293285
```python
294286
from langchain_google_genai import ChatGoogleGenerativeAI
295287

@@ -324,7 +316,6 @@ To provide an image, pass a human message with contents of type `List[dict]`, wh
324316
- A base64 encoded image (e.g., `data:image/png;base64,abcd124`)
325317
- A PIL image
326318

327-
328319
```python
329320
# CASE - A pulbic image URL
330321
import requests
@@ -339,8 +330,7 @@ Image(content)
339330

340331

341332

342-
![jpeg](output_17_0.jpg)
343-
333+
![jpeg](sample\img\output_17_0.jpg)
344334

345335

346336

sample/05-GoogleGenerativeAI-(WIKIDOCS).md renamed to sample/old_version/05-GoogleGenerativeAI-(WIKIDOCS).md

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pre {
2727

2828
## Overview
2929

30-
You can use the `ChatGoogleGenerativeAI` class from the [langchain-google-genai](https://pypi.org/project/langchain-google-genai/) integration package to access not only Google AI¡¯s `gemini` and `gemini-vision` models, but also other generative models.
30+
You can use the `ChatGoogleGenerativeAI` class from the [langchain-google-genai](https://pypi.org/project/langchain-google-genai/) integration package to access not only Google AI��s `gemini` and `gemini-vision` models, but also other generative models.
3131

3232
### Table of Contents
3333

@@ -106,7 +106,7 @@ load_dotenv(override=True)
106106

107107
Import the `ChatGoogleGenerativeAI` class from the `langchain_google_genai` package.
108108

109-
The `ChatGoogleGenerativeAI` class is used to implement conversational AI systems using Google¡¯s Generative AI models. Through this class, users can interact with Google¡¯s conversational AI model. Conversations with the model take place in a chat format, and the model generates appropriate responses based on user input.
109+
The `ChatGoogleGenerativeAI` class is used to implement conversational AI systems using Google��s Generative AI models. Through this class, users can interact with Google��s conversational AI model. Conversations with the model take place in a chat format, and the model generates appropriate responses based on user input.
110110

111111
Because the `ChatGoogleGenerativeAI` class is integrated with the LangChain framework, it can be used alongside other LangChain components.
112112

test.ipynb

-59
This file was deleted.

0 commit comments

Comments
 (0)