Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

LangSmith Client SDK Implementations

License

NotificationsYou must be signed in to change notification settings

langchain-ai/langsmith-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Release NotesPython Downloads

NPM VersionJS Downloads

This repository contains the Python and Javascript SDK's for interacting with theLangSmith platform. Please seeLangSmith Documentationfor documentation about using the LangSmith platform and the client SDK.

LangSmith helps your team debug, evaluate, and monitor your language models and intelligent agents. It workswith any LLM Application, including a native integration with theLangChain Python andLangChain JS open source libraries.

LangSmith is developed and maintained byLangChain, the company behind the LangChain framework.

Quick Start

To get started with the Python SDK,install the package, then follow the instructions in thePython README.

pip install -U langsmithexport LANGSMITH_TRACING=trueexport LANGSMITH_API_KEY=ls_...

Then start tracing your app:

importopenaifromlangsmithimporttraceablefromlangsmith.wrappersimportwrap_openaiclient=wrap_openai(openai.Client())client.chat.completions.create(messages=[{"role":"user","content":"Hello, world"}],model="gpt-3.5-turbo")

To get started with the JavaScript / TypeScript SDK,install the package, then follow the instructions in theJS README.

yarn add langsmithexport LANGSMITH_TRACING=trueexport LANGSMITH_API_KEY=ls_...

Then start tracing your app!

import{OpenAI}from"openai";import{traceable}from"langsmith/traceable";import{wrapOpenAI}from"langsmith/wrappers";constclient=wrapOpenAI(newOpenAI());awaitclient.chat.completions.create({model:"gpt-3.5-turbo",messages:[{content:"Hi there!",role:"user"}],});
{  id: 'chatcmpl-8sOWEOYVyehDlyPcBiaDtTxWvr9v6',  object: 'chat.completion',  created: 1707974654,  model: 'gpt-3.5-turbo-0613',  choices: [    {      index: 0,      message: { role: 'assistant', content: 'Hello! How can I help you today?' },      logprobs: null,      finish_reason: 'stop'    }  ],  usage: { prompt_tokens: 10, completion_tokens: 9, total_tokens: 19 },  system_fingerprint: null}

Cookbook

For tutorials on how to get more value out of LangSmith, check out theLangsmith Cookbook repo.

Documentation

To learn more about the LangSmith platform, check out thedocs

About

LangSmith Client SDK Implementations

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors53


[8]ページ先頭

©2009-2025 Movatter.jp