mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
style: .. code-block:: admonition translations (#33400)
biiiiiiiiiiiiiiiigggggggg pass
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -133,12 +133,11 @@ class AnthropicLLM(LLM, _AnthropicCommon):
|
||||
set with your API key, or pass it as a named parameter to the constructor.
|
||||
|
||||
Example:
|
||||
.. code-block:: python
|
||||
|
||||
from langchain_anthropic import AnthropicLLM
|
||||
|
||||
model = AnthropicLLM()
|
||||
```python
|
||||
from langchain_anthropic import AnthropicLLM
|
||||
|
||||
model = AnthropicLLM()
|
||||
```
|
||||
"""
|
||||
|
||||
model_config = ConfigDict(
|
||||
@@ -261,12 +260,11 @@ class AnthropicLLM(LLM, _AnthropicCommon):
|
||||
The string generated by the model.
|
||||
|
||||
Example:
|
||||
.. code-block:: python
|
||||
|
||||
prompt = "What are the biggest risks facing humanity?"
|
||||
prompt = f"\n\nHuman: {prompt}\n\nAssistant:"
|
||||
response = model.invoke(prompt)
|
||||
|
||||
```python
|
||||
prompt = "What are the biggest risks facing humanity?"
|
||||
prompt = f"\n\nHuman: {prompt}\n\nAssistant:"
|
||||
response = model.invoke(prompt)
|
||||
```
|
||||
"""
|
||||
if self.streaming:
|
||||
completion = ""
|
||||
@@ -347,15 +345,13 @@ class AnthropicLLM(LLM, _AnthropicCommon):
|
||||
A generator representing the stream of tokens from Anthropic.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
prompt = "Write a poem about a stream."
|
||||
prompt = f"\n\nHuman: {prompt}\n\nAssistant:"
|
||||
generator = anthropic.stream(prompt)
|
||||
for token in generator:
|
||||
yield token
|
||||
|
||||
```python
|
||||
prompt = "Write a poem about a stream."
|
||||
prompt = f"\n\nHuman: {prompt}\n\nAssistant:"
|
||||
generator = anthropic.stream(prompt)
|
||||
for token in generator:
|
||||
yield token
|
||||
```
|
||||
"""
|
||||
stop = self._get_anthropic_stop(stop)
|
||||
params = {**self._default_params, **kwargs}
|
||||
@@ -394,14 +390,13 @@ class AnthropicLLM(LLM, _AnthropicCommon):
|
||||
A generator representing the stream of tokens from Anthropic.
|
||||
|
||||
Example:
|
||||
.. code-block:: python
|
||||
|
||||
prompt = "Write a poem about a stream."
|
||||
prompt = f"\n\nHuman: {prompt}\n\nAssistant:"
|
||||
generator = anthropic.stream(prompt)
|
||||
for token in generator:
|
||||
yield token
|
||||
|
||||
```python
|
||||
prompt = "Write a poem about a stream."
|
||||
prompt = f"\n\nHuman: {prompt}\n\nAssistant:"
|
||||
generator = anthropic.stream(prompt)
|
||||
for token in generator:
|
||||
yield token
|
||||
```
|
||||
"""
|
||||
stop = self._get_anthropic_stop(stop)
|
||||
params = {**self._default_params, **kwargs}
|
||||
|
||||
Reference in New Issue
Block a user