本页还没有译文
本页 11 段还没译成简体中文,下面显示的是英文原文。Helicone integrations
还没翻译译自英文(docs.langchain.com)本页 11 段都还没译
This page covers how to use the Helicone ecosystem within LangChain.
What is helicone?
Helicone is an open-source observability platform that proxies your OpenAI traffic and provides you key insights into your spend, latency and usage.
Quick start
With your LangChain environment you can just add the following parameter.
export OPENAI_API_BASE="https://oai.hconeai.com/v1"Now head over to helicone.ai to create your account, and add your OpenAI API key within our dashboard to view your logs.
How to enable helicone caching
from langchain_openai 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.invoke(text))How to use helicone custom properties
from langchain_openai 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.invoke(text))AI 翻译查看英文原文