Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: nit on vertext ai docs #1171

Merged
merged 5 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions cookbook/integration_google_vertex_and_gemini.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,10 @@
"\n",
"# Get keys for your project from the project settings page\n",
"# https://cloud.langfuse.com\n",
"os.environ[\"LANGFUSE_PUBLIC_KEY\"] = \"\"\n",
"os.environ[\"LANGFUSE_SECRET_KEY\"] = \"\"\n",
"os.environ[\"LANGFUSE_PUBLIC_KEY\"] = \"\"\n",
"os.environ[\"LANGFUSE_HOST\"] = \"https://cloud.langfuse.com\" # 🇪🇺 EU region\n",
"# os.environ[\"LANGFUSE_HOST\"] = \"https://us.cloud.langfuse.com\" # 🇺🇸 US region\n",
"\n",
"# Your openai key\n",
"os.environ[\"OPENAI_API_KEY\"] = \"\""
"# os.environ[\"LANGFUSE_HOST\"] = \"https://us.cloud.langfuse.com\" # 🇺🇸 US region"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions cookbook/python_decorators.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
"os.environ[\"ANTHROPIC_API_KEY\"] = \"\"\n",
"\n",
"import anthropic\n",
"anthopic_client = anthropic.Anthropic()"
"anthropic_client = anthropic.Anthropic()"
]
},
{
Expand All @@ -236,7 +236,7 @@
" metadata=kwargs_clone\n",
" )\n",
" \n",
" response = anthopic_client.messages.create(**kwargs)\n",
" response = anthropic_client.messages.create(**kwargs)\n",
"\n",
" # See docs for more details on token counts and usd cost in Langfuse\n",
" # https://langfuse.com/docs/model-usage-and-cost\n",
Expand Down
5 changes: 1 addition & 4 deletions pages/docs/integrations/google-vertex-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,10 @@ import os

# Get keys for your project from the project settings page
# https://cloud.langfuse.com
os.environ["LANGFUSE_PUBLIC_KEY"] = ""
os.environ["LANGFUSE_SECRET_KEY"] = ""
os.environ["LANGFUSE_PUBLIC_KEY"] = ""
os.environ["LANGFUSE_HOST"] = "https://cloud.langfuse.com" # 🇪🇺 EU region
# os.environ["LANGFUSE_HOST"] = "https://us.cloud.langfuse.com" # 🇺🇸 US region

# Your openai key
os.environ["OPENAI_API_KEY"] = ""
```

## How to wrap the Vertex AI SDK with the Langfuse Decorator
Expand Down
2 changes: 1 addition & 1 deletion pages/docs/integrations/huggingface.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ client = OpenAI(

### Chat Completion Request

Use the `client` to make a chat completion request to the Hugging Face model. The `model` parameter can be any identifier since the actual model is specified in the `base_url.`
Use the `client` to make a chat completion request to the Hugging Face model. The `model` parameter can be any identifier since the actual model is specified in the `base_url.` In this example, we set the model variable `tgi`, short for [Text Generation Inference](https://huggingface.co/docs/text-generation-inference/en/index).


```python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,10 @@ import os

# Get keys for your project from the project settings page
# https://cloud.langfuse.com
os.environ["LANGFUSE_PUBLIC_KEY"] = ""
os.environ["LANGFUSE_SECRET_KEY"] = ""
os.environ["LANGFUSE_PUBLIC_KEY"] = ""
os.environ["LANGFUSE_HOST"] = "https://cloud.langfuse.com" # 🇪🇺 EU region
# os.environ["LANGFUSE_HOST"] = "https://us.cloud.langfuse.com" # 🇺🇸 US region

# Your openai key
os.environ["OPENAI_API_KEY"] = ""
```

## How to wrap the Vertex AI SDK with the Langfuse Decorator
Expand Down
4 changes: 2 additions & 2 deletions pages/guides/cookbook/python_decorators.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ This works with any LLM provider/SDK. In this example, we'll use Anthropic.
os.environ["ANTHROPIC_API_KEY"] = ""

import anthropic
anthopic_client = anthropic.Anthropic()
anthropic_client = anthropic.Anthropic()
```


Expand All @@ -156,7 +156,7 @@ def anthropic_completion(**kwargs):
metadata=kwargs_clone
)

response = anthopic_client.messages.create(**kwargs)
response = anthropic_client.messages.create(**kwargs)

# See docs for more details on token counts and usd cost in Langfuse
# https://langfuse.com/docs/model-usage-and-cost
Expand Down
Loading