mirror of
https://github.com/hwchase17/langchain
synced 2024-10-31 15:20:26 +00:00
e2d7677526
# 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.
54 lines
1.5 KiB
Markdown
54 lines
1.5 KiB
Markdown
# Helicone
|
|
|
|
This page covers how to use the [Helicone](https://helicone.ai) ecosystem within LangChain.
|
|
|
|
## What is Helicone?
|
|
|
|
Helicone is an [open source](https://github.com/Helicone/helicone) observability platform that proxies your OpenAI traffic and provides you key insights into your spend, latency and usage.
|
|
|
|
![Helicone](../_static/HeliconeDashboard.png)
|
|
|
|
## Quick start
|
|
|
|
With your LangChain environment you can just add the following parameter.
|
|
|
|
```bash
|
|
export OPENAI_API_BASE="https://oai.hconeai.com/v1"
|
|
```
|
|
|
|
Now head over to [helicone.ai](https://helicone.ai/onboarding?step=2) to create your account, and add your OpenAI API key within our dashboard to view your logs.
|
|
|
|
![Helicone](../_static/HeliconeKeys.png)
|
|
|
|
## How to enable Helicone caching
|
|
|
|
```python
|
|
from langchain.llms import OpenAI
|
|
import openai
|
|
openai.api_base = "https://oai.hconeai.com/v1"
|
|
|
|
llm = OpenAI(temperature=0.9, headers={"Helicone-Cache-Enabled": "true"})
|
|
text = "What is a helicone?"
|
|
print(llm(text))
|
|
```
|
|
|
|
[Helicone caching docs](https://docs.helicone.ai/advanced-usage/caching)
|
|
|
|
## How to use Helicone custom properties
|
|
|
|
```python
|
|
from langchain.llms import OpenAI
|
|
import openai
|
|
openai.api_base = "https://oai.hconeai.com/v1"
|
|
|
|
llm = OpenAI(temperature=0.9, headers={
|
|
"Helicone-Property-Session": "24",
|
|
"Helicone-Property-Conversation": "support_issue_2",
|
|
"Helicone-Property-App": "mobile",
|
|
})
|
|
text = "What is a helicone?"
|
|
print(llm(text))
|
|
```
|
|
|
|
[Helicone property docs](https://docs.helicone.ai/advanced-usage/custom-properties)
|