Search is not available for this dataset
repo_id stringlengths 12 110 | file_path stringlengths 24 164 | content stringlengths 3 89.3M | __index_level_0__ int64 0 0 |
|---|---|---|---|
public_repos/langsmith-wrappers | public_repos/langsmith-wrappers/langsmith/__init__.py | import langsmith
__version__ = getattr(langsmith, "__version__", "Unknown")
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
| 0 |
public_repos/langsmith-wrappers/langsmith | public_repos/langsmith-wrappers/langsmith/wrappers/openai.py | from __future__ import annotations
from typing import TYPE_CHECKING, Any
from langsmith.wrappers.base import ModuleWrapper
if TYPE_CHECKING:
import openai
def __getattr__(name: str) -> Any:
if name == "openai":
try:
import openai as openai_base
except ImportError:
ra... | 0 |
public_repos/langsmith-wrappers/langsmith | public_repos/langsmith-wrappers/langsmith/wrappers/base.py | import inspect
import logging
from typing import Any, Optional, Set
from langsmith.run_helpers import traceable
logger = logging.getLogger(__name__)
def _get_module_path(module_class: type) -> str:
"""
Returns the full module path of a given class.
:param module_class: The class to get the module path ... | 0 |
public_repos/langsmith-wrappers/langsmith | public_repos/langsmith-wrappers/langsmith/wrappers/__init__.py | """LangSmith experimental wrappers."""
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # noqa: F405
| 0 |
public_repos/langsmith-wrappers/tests | public_repos/langsmith-wrappers/tests/wrappers/test_openai.py | import pytest
from langsmith.wrappers.openai import openai
def test_openai_chat_completion():
result = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{
"role": "user",
"content": "What's the weather like in san francisco right now?",
... | 0 |
public_repos | public_repos/langsmith-sdk/README.md | # LangSmith Client SDKs
This repository contains `BaseTracer` schemas used in LangChain as well as the Python and Javascript clients for interacting with the [LangSmith platform](https://smith.langchain.com/).
LangSmith helps you and your team debug, evaluate, and monitor your language models and intelligent agents. ... | 0 |
public_repos | public_repos/langsmith-sdk/LICENSE | MIT License
Copyright (c) 2023 LangChain
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distrib... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/python/poetry.lock | # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
[[package]]
name = "aiohttp"
version = "3.8.6"
description = "Async http client/server framework (asyncio)"
optional = false
python-versions = ">=3.6"
files = [
{file = "aiohttp-3.8.6-cp310-cp310-macosx_10_9_universal2.whl",... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/python/Makefile | .PHONY: tests lint format
tests:
poetry run pytest tests/unit_tests
integration_tests:
poetry run pytest tests/integration_tests
lint:
poetry run ruff .
poetry run mypy .
poetry run black . --check
format:
poetry run ruff format .
poetry run ruff --fix .
poetry run black .
build:
poetry build
publish:
p... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/python/pyproject.toml | [tool.poetry]
name = "langsmith"
version = "0.0.65"
description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform."
authors = ["LangChain <support@langchain.dev>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/langchain-ai/langsmith-sdk"
homepage = "https://smith.... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/python/mypy.ini | [mypy]
plugins = pydantic.mypy
| 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/python/README.md | # LangSmith Client SDK
This package contains the Python client for interacting with the [LangSmith platform](https://smith.langchain.com/).
To install:
```bash
pip install langsmith
```
LangSmith helps you and your team develop and evaluate language models and intelligent agents. It is compatible with any LLM Appli... | 0 |
public_repos/langsmith-sdk/python | public_repos/langsmith-sdk/python/langsmith/client.py | """The LangSmith Client."""
from __future__ import annotations
import collections
import concurrent
import datetime
import functools
import importlib
import io
import json
import logging
import os
import random
import socket
import time
import uuid
import weakref
from typing import (
TYPE_CHECKING,
Any,
Ca... | 0 |
public_repos/langsmith-sdk/python | public_repos/langsmith-sdk/python/langsmith/run_helpers.py | """Decorator for creating a run tree from functions."""
from __future__ import annotations
import contextlib
import contextvars
import functools
import inspect
import logging
import traceback
import uuid
from concurrent import futures
from typing import (
TYPE_CHECKING,
Any,
AsyncGenerator,
Awaitable,
... | 0 |
public_repos/langsmith-sdk/python | public_repos/langsmith-sdk/python/langsmith/env.py | """Environment information."""
import functools
import os
import platform
import subprocess
from typing import Dict, List, Optional, Union
from langsmith.utils import get_docker_compose_command
try:
# psutil is an optional dependency
import psutil
_PSUTIL_AVAILABLE = True
except ImportError:
_PSUTIL_... | 0 |
public_repos/langsmith-sdk/python | public_repos/langsmith-sdk/python/langsmith/utils.py | """Generic utility functions."""
import enum
import functools
import logging
import os
import subprocess
from typing import Any, Callable, Dict, List, Mapping, Optional, Tuple, Union
import requests
from langsmith import schemas as ls_schemas
_LOGGER = logging.getLogger(__name__)
class LangSmithError(Exception):
... | 0 |
public_repos/langsmith-sdk/python | public_repos/langsmith-sdk/python/langsmith/run_trees.py | """Schemas for the LangSmith API."""
from __future__ import annotations
import logging
import warnings
from concurrent.futures import Future, ThreadPoolExecutor, wait
from datetime import datetime
from typing import Any, Callable, Dict, List, Optional, cast
from uuid import UUID, uuid4
try:
from pydantic.v1 impor... | 0 |
public_repos/langsmith-sdk/python | public_repos/langsmith-sdk/python/langsmith/schemas.py | """Schemas for the LangSmith API."""
from __future__ import annotations
from datetime import datetime, timedelta
from enum import Enum
from typing import (
Any,
Dict,
List,
Optional,
Protocol,
TypedDict,
Union,
runtime_checkable,
)
from uuid import UUID
try:
from pydantic.v1 import... | 0 |
public_repos/langsmith-sdk/python | public_repos/langsmith-sdk/python/langsmith/__init__.py | """LangSmith Client."""
from importlib import metadata
try:
__version__ = metadata.version(__package__)
except metadata.PackageNotFoundError:
# Case where package metadata is not available.
__version__ = ""
from langsmith.client import Client
from langsmith.evaluation.evaluator import EvaluationResult, Ru... | 0 |
public_repos/langsmith-sdk/python/langsmith | public_repos/langsmith-sdk/python/langsmith/cli/main.py | import argparse
import json
import logging
import os
import shutil
import subprocess
from contextlib import contextmanager
from pathlib import Path
from typing import Dict, Generator, List, Literal, Mapping, Optional, Union, cast
import requests
from langsmith import env as ls_env
from langsmith import utils as ls_ut... | 0 |
public_repos/langsmith-sdk/python/langsmith | public_repos/langsmith-sdk/python/langsmith/cli/docker-compose.beta.yaml | version: '3'
services:
# TODO: Move to the regular docker-compose.yaml once deployed
langchain-hub:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainhub-backend:latest
environment:
- PORT=1985
- LANGCHAIN_ENV=local_docker
- LOG_LEVEL=warning
- LANGSMITH_LICENSE_KEY=${LANGSMITH_LI... | 0 |
public_repos/langsmith-sdk/python/langsmith | public_repos/langsmith-sdk/python/langsmith/cli/nginx.conf | server {
listen 80;
server_name localhost;
add_header Content-Security-Policy "frame-ancestors 'self'" always;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
... | 0 |
public_repos/langsmith-sdk/python/langsmith | public_repos/langsmith-sdk/python/langsmith/cli/docker-compose.ngrok.yaml | version: '3'
services:
ngrok:
image: ngrok/ngrok:latest
restart: unless-stopped
command:
- "start"
- "--all"
- "--config"
- "/etc/ngrok.yml"
volumes:
- ./ngrok_config.yaml:/etc/ngrok.yml
ports:
- 4040:4040
langchain-backend:
depends_on:
- ngrok
| 0 |
public_repos/langsmith-sdk/python/langsmith | public_repos/langsmith-sdk/python/langsmith/cli/docker-compose.yaml | version: "3"
services:
langchain-playground:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-playground:latest
ports:
- 3001:3001
langchain-frontend:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-frontend-dynamic:latest
ports:
- 80:80
volumes:
- ./nginx.co... | 0 |
public_repos/langsmith-sdk/python/langsmith | public_repos/langsmith-sdk/python/langsmith/cli/docker-compose.dev.yaml | version: '3'
services:
# TODO: Move to the regular docker-compose.yaml once deployed
langchain-hub:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainhub-backend:latest
environment:
- PORT=1985
- LANGCHAIN_ENV=local_docker
- LOG_LEVEL=warning
- LANGSMITH_LICENSE_KEY=${LANGSMITH_LI... | 0 |
public_repos/langsmith-sdk/python/langsmith | public_repos/langsmith-sdk/python/langsmith/evaluation/evaluator.py | import asyncio
import uuid
from abc import abstractmethod
from typing import Callable, Dict, List, Optional, TypedDict, Union
try:
from pydantic.v1 import BaseModel, Field # type: ignore[import]
except ImportError:
from pydantic import BaseModel, Field
from functools import wraps
from langsmith.schemas impo... | 0 |
public_repos/langsmith-sdk/python/langsmith | public_repos/langsmith-sdk/python/langsmith/evaluation/string_evaluator.py | from typing import Callable, Dict, Optional
from pydantic import BaseModel
from langsmith.evaluation.evaluator import EvaluationResult, RunEvaluator
from langsmith.schemas import Example, Run
class StringEvaluator(RunEvaluator, BaseModel):
"""Grades the run's string input, output, and optional answer."""
e... | 0 |
public_repos/langsmith-sdk/python/langsmith | public_repos/langsmith-sdk/python/langsmith/evaluation/__init__.py | """Evaluation Helpers."""
from langsmith.evaluation.evaluator import EvaluationResult, RunEvaluator
from langsmith.evaluation.string_evaluator import StringEvaluator
__all__ = ["EvaluationResult", "RunEvaluator", "StringEvaluator"]
| 0 |
public_repos/langsmith-sdk/python/tests | public_repos/langsmith-sdk/python/tests/unit_tests/test_client.py | """Test the LangSmith client."""
import asyncio
import json
import os
import uuid
from datetime import datetime
from io import BytesIO
from typing import Optional
from unittest import mock
from unittest.mock import patch
import pytest
from pydantic import BaseModel
from langsmith.client import (
Client,
_get_... | 0 |
public_repos/langsmith-sdk/python/tests | public_repos/langsmith-sdk/python/tests/unit_tests/test_run_helpers.py | import inspect
from typing import Any
import pytest
from langsmith.run_helpers import _get_inputs, as_runnable, traceable
def test__get_inputs_with_no_args() -> None:
def foo() -> None:
pass
signature = inspect.signature(foo)
inputs = _get_inputs(signature)
assert inputs == {}
def test__g... | 0 |
public_repos/langsmith-sdk/python/tests | public_repos/langsmith-sdk/python/tests/unit_tests/test_utils.py | import unittest
import pytest
import langsmith.utils as ls_utils
class LangSmithProjectNameTest(unittest.TestCase):
class GetTracerProjectTestCase:
def __init__(
self, test_name, envvars, expected_project_name, return_default_value=None
):
self.test_name = test_name
... | 0 |
public_repos/langsmith-sdk/python/tests/unit_tests | public_repos/langsmith-sdk/python/tests/unit_tests/cli/test_main.py | """Test utilities in the LangSmith server."""
from langsmith.cli.main import _dumps_yaml
def test__dumps_yaml() -> None:
d = {
"region": "us",
"tunnels": {"langchain": {"addr": "langchain-backend:8000", "proto": "http"}},
"version": "2",
}
expected = """region: us
tunnels:
langch... | 0 |
public_repos/langsmith-sdk/python/tests | public_repos/langsmith-sdk/python/tests/integration_tests/test_client.py | """LangSmith langchain_client Integration Tests."""
import io
import os
import random
import string
import time
from datetime import datetime
from typing import List, Optional
from uuid import uuid4
import pytest
from freezegun import freeze_time
from langchain.schema import FunctionMessage, HumanMessage
from langsmi... | 0 |
public_repos/langsmith-sdk/python/tests | public_repos/langsmith-sdk/python/tests/integration_tests/test_runs.py | import asyncio
import os
import time
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor
from typing import AsyncGenerator, Generator, Optional
import pytest
from langsmith import utils as ls_utils
from langsmith.client import Client
from langsmith.run_helpers import trace, traceable... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/_scripts/_fetch_schema.py | """Fetch and prune the Langsmith spec."""
import argparse
from pathlib import Path
import requests
import yaml
from openapi_spec_validator import validate_spec
def get_dependencies(schema, obj_name, new_components):
if obj_name in new_components["schemas"]:
return
obj_schema = schema["components"]["... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/openapi/openapi.yaml | openapi: 3.0.2
info:
title: LangSmith
version: 0.1.0
paths:
/runs/{run_id}:
patch:
tags:
- run
summary: Update Run
description: Update a run.
operationId: update_run_runs__run_id__patch
parameters:
- required: true
schema:
title: Run Id
typ... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/js/yarn.lock | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@ampproject/remapping@^2.2.0":
version "2.2.1"
resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz"
integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zh... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/js/jest.config.cjs | /** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest/presets/default-esm",
testEnvironment: "node",
modulePathIgnorePatterns: ["dist/"],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
transform: {
"^.+\\.m?[tj]sx?$": ["ts-jest", { useESM: true }],
},
se... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/js/.prettierrc | {
"endOfLine": "lf"
} | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/js/tsconfig.json | {
"extends": "@tsconfig/recommended",
"compilerOptions": {
"target": "ES2021",
"lib": [
"ES2021",
"ES2022.Object",
"DOM"
],
"module": "ES2020",
"moduleResolution": "nodenext",
"esModuleInterop": true,
"declaration": true,
"noImplicitReturns": true,
"noFallthroug... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/js/tsconfig.cjs.json | {
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"declaration": false
},
"exclude": [
"node_modules",
"dist",
"docs",
"**/tests"
]
} | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/js/README.md | # LangSmith Client SDK
This package contains the TypeScript client for interacting with the [LangSmith platform](https://smith.langchain.com/).
To install:
```bash
yarn add langsmith
```
LangSmith helps you and your team develop and evaluate language models and intelligent agents. It is compatible with any LLM Appl... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/js/.eslintrc.cjs | module.exports = {
extends: [
"eslint:recommended",
"prettier",
"plugin:@typescript-eslint/recommended",
],
parserOptions: {
ecmaVersion: 12,
parser: "@typescript-eslint/parser",
project: "./tsconfig.json",
sourceType: "module",
},
plugins: ["import", "@typescript-eslint", "no-inst... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/js/babel.config.cjs | // babel.config.js
module.exports = {
presets: [
["@babel/preset-env", {
targets: {
node: true
}
}]
],
}; | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/js/package.json | {
"name": "langsmith",
"version": "0.0.48",
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",
"files": [
"dist/",
"client.cjs",
"client.js",
"client.d.ts",
"run_trees.cjs",
"run_trees.js",
"run_trees.d.ts",
"evaluation.cjs",
"ev... | 0 |
public_repos/langsmith-sdk | public_repos/langsmith-sdk/js/.npmignore | src/ | 0 |
public_repos/langsmith-sdk/js | public_repos/langsmith-sdk/js/src/run_trees.ts | import * as uuid from "uuid";
import { BaseRun, KVMap, RunCreate, RunUpdate } from "./schemas.js";
import { getEnvironmentVariable, getRuntimeEnvironment } from "./utils/env.js";
import { Client } from "./client.js";
const warnedMessages: Record<string, boolean> = {};
function warnOnce(message: string): void {
if (... | 0 |
public_repos/langsmith-sdk/js | public_repos/langsmith-sdk/js/src/index.ts | export { Client } from "./client.js";
export { Dataset, Example, TracerSession, Run, Feedback } from "./schemas.js";
export { RunTree, RunTreeConfig } from "./run_trees.js";
| 0 |
public_repos/langsmith-sdk/js | public_repos/langsmith-sdk/js/src/client.ts | import * as uuid from "uuid";
import { AsyncCaller, AsyncCallerParams } from "./utils/async_caller.js";
import {
DataType,
Dataset,
DatasetShareSchema,
Example,
ExampleCreate,
ExampleUpdate,
Feedback,
KVMap,
LangChainBaseMessage,
Run,
RunCreate,
RunUpdate,
ScoreType,
TracerSession,
Tracer... | 0 |
public_repos/langsmith-sdk/js | public_repos/langsmith-sdk/js/src/schemas.ts | export interface TracerSession {
tenant_id: string;
id: string;
start_time: number;
name?: string;
}
// Fully loaded information about a Tracer Session (also known
// as a Project)
export interface TracerSessionResult extends TracerSession {
// The number of runs in the session.
run_count?: number;
// Th... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/utils/env.ts | // Inlined from https://github.com/flexdinesh/browser-or-node
declare global {
const Deno:
| {
version: {
deno: string;
};
}
| undefined;
}
export const isBrowser = () =>
typeof window !== "undefined" && typeof window.document !== "undefined";
export const isWebWorker = () ... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/utils/async_caller.ts | import pRetry from "p-retry";
import PQueueMod from "p-queue";
const STATUS_NO_RETRY = [
400, // Bad Request
401, // Unauthorized
403, // Forbidden
404, // Not Found
405, // Method Not Allowed
406, // Not Acceptable
407, // Proxy Authentication Required
408, // Request Timeout
409, // Conflict
];
ex... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/utils/messages.ts | import { LangChainBaseMessage } from "../schemas.js";
export function isLangChainMessage(
message?: any
): message is LangChainBaseMessage {
return typeof message?._getType === "function";
}
// Add index signature to data object
interface ConvertedData {
content: string;
[key: string]: any;
}
export function... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/tests/run_trees.int.test.ts | import { Client } from "../client.js";
import { RunTree, RunTreeConfig } from "../run_trees.js";
async function toArray<T>(iterable: AsyncIterable<T>): Promise<T[]> {
const result: T[] = [];
for await (const item of iterable) {
result.push(item);
}
return result;
}
test("Test post and patch run", async ()... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/tests/client.test.ts | import { jest } from "@jest/globals";
import { Client } from "../client.js";
describe("Client", () => {
describe("createLLMExample", () => {
it("should create an example with the given input and generation", async () => {
const client = new Client();
const createExampleSpy = jest
.spyOn(clien... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/tests/client.int.test.ts | import { Dataset, Feedback, Run } from "../schemas.js";
import { FunctionMessage, HumanMessage } from "langchain/schema";
import { RunTree, RunTreeConfig } from "../run_trees.js";
import { Client } from "../client.js";
import { StringEvaluator } from "../evaluation/string_evaluator.js";
import { v4 as uuidv4 } from "u... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/cli/main.ts | import * as child_process from "child_process";
import * as fs from "fs";
import * as path from "path";
import * as util from "util";
import {
getLangChainEnvVars,
getRuntimeEnvironment,
setEnvironmentVariable,
} from "../utils/env.js";
import { Command } from "commander";
import { spawn } from "child_process";... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/cli/docker-compose.beta.yaml | version: '3'
services:
# TODO: Move to the regular docker-compose.yaml once deployed
langchain-hub:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainhub-backend:latest
environment:
- PORT=1985
- LANGCHAIN_ENV=local_docker
- LOG_LEVEL=warning
- LANGSMITH_LICENSE_KEY=${LANGSMITH_LI... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/cli/nginx.conf | server {
listen 80;
server_name localhost;
add_header Content-Security-Policy "frame-ancestors 'self'" always;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/cli/docker-compose.ngrok.yaml | version: '3'
services:
ngrok:
image: ngrok/ngrok:latest
restart: unless-stopped
command:
- "start"
- "--all"
- "--config"
- "/etc/ngrok.yml"
volumes:
- ./ngrok_config.yaml:/etc/ngrok.yml
ports:
- 4040:4040
langchain-backend:
depends_on:
- ngrok
| 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/cli/docker-compose.yaml | version: "3"
services:
langchain-playground:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-playground:latest
ports:
- 3001:3001
langchain-frontend:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-frontend-dynamic:latest
ports:
- 80:80
volumes:
- ./nginx.co... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/cli/docker-compose.dev.yaml | version: '3'
services:
# TODO: Move to the regular docker-compose.yaml once deployed
langchain-hub:
image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainhub-backend:latest
environment:
- PORT=1985
- LANGCHAIN_ENV=local_docker
- LOG_LEVEL=warning
- LANGSMITH_LICENSE_KEY=${LANGSMITH_LI... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/evaluation/index.ts | // Evaluation methods
export { RunEvaluator, EvaluationResult } from "./evaluator.js";
export {
StringEvaluator,
GradingFunctionParams,
GradingFunctionResult,
} from "./string_evaluator.js";
| 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/evaluation/string_evaluator.ts | import { Example, Run, ScoreType, ValueType } from "../schemas.js";
import { EvaluationResult, RunEvaluator } from "./evaluator.js";
export interface GradingFunctionResult {
key?: string;
score?: ScoreType;
value?: ValueType;
comment?: string;
correction?: object;
}
export interface GradingFunctionParams {
... | 0 |
public_repos/langsmith-sdk/js/src | public_repos/langsmith-sdk/js/src/evaluation/evaluator.ts | import { Example, KVMap, Run, ScoreType, ValueType } from "../schemas.js";
export interface EvaluationResult {
key: string;
score?: ScoreType;
value?: ValueType;
comment?: string;
correction?: object;
evaluatorInfo?: KVMap;
}
export interface RunEvaluator {
evaluateRun(run: Run, example?: Example): Prom... | 0 |
public_repos/langsmith-sdk/js | public_repos/langsmith-sdk/js/scripts/move-cjs-to-dist.js | import { resolve, dirname, parse, format } from "node:path";
import { readdir, readFile, writeFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
function abs(relativePath) {
return resolve(dirname(fileURLToPath(import.meta.url)), relativePath);
}
async function moveAndRename(source, dest) {
... | 0 |
public_repos/langsmith-sdk/js | public_repos/langsmith-sdk/js/scripts/create-entrypoints.js | import * as fs from "fs";
import * as path from "path";
// This lists all the entrypoints for the library. Each key corresponds to an
// importable path, eg. `import { Foo } from "langsmith/client"`.
// The value is the path to the file in `src/` that exports the entrypoint.
// This is used to generate the `exports` f... | 0 |
public_repos/langsmith-sdk/js | public_repos/langsmith-sdk/js/scripts/create-cli.js | import * as fs from "fs";
import * as path from "path";
let dirname = new URL(".", import.meta.url).pathname;
// If on Windows, remove the leading slash
if (process.platform === "win32" && dirname.startsWith("/")) {
dirname = dirname.slice(1);
}
const mainPath = path.join(dirname, "../dist/cli/main.cjs");
const mai... | 0 |
public_repos | public_repos/nltk_data/README.txt | Data Distribution for NLTK
Install using NLTK downloader: nltk.download()
For instructions please see http://www.nltk.org/
| 0 |
public_repos | public_repos/nltk_data/Makefile | PYTHON = python3
BASEURL = https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages
pkg_index:
$(PYTHON) tools/build_collections.py .
$(PYTHON) tools/build_pkg_index.py . $(BASEURL) index.xml
git add collections
git add index.xml
git commit -m "updated data index"
grammars:
git commit -m "updated gram... | 0 |
public_repos | public_repos/nltk_data/index.xml | <?xml version="1.0"?>
<?xml-stylesheet href="index.xsl" type="text/xsl"?>
<nltk_data>
<packages>
<package id="perluniprops" name="perluniprops: Index of Unicode Version 7.0.0 character properties in Perl" webpage="http://perldoc.perl.org/perluniprops.html" license="" unzip="1" unzipped_size="136038" size="100266"... | 0 |
public_repos | public_repos/nltk_data/index.xsl | <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/nltk_data">
<HTML>
<HEAD>
<TITLE>NLTK Data</TITLE>
</HEAD>
<BODY bgcolor="white" text="navy">
<H1>NLTK Corpora</H1>
... | 0 |
public_repos/nltk_data | public_repos/nltk_data/tools/build_pkg_index.py | #!/usr/bin/env python
"""
Build the corpus package index. Usage:
build_pkg_index.py <path-to-packages> <base-url> <output-file>
"""
xml_header = """<?xml version="1.0"?>
<?xml-stylesheet href="index.xsl" type="text/xsl"?>
"""
import sys
from nltk.downloader import build_index
from xml.etree import ElementTree
i... | 0 |
public_repos/nltk_data | public_repos/nltk_data/tools/download.sh | #!/bin/bash
function usage() {
echo
echo "Usage: $(basename $0) <collection name>"
echo
echo "Copies nltk data to proper locations from local copy of repository."
echo "Assumes script is in repo tools directory."
echo
echo "Clone the repo:"
printf '\t%s\n' 'git clone git@github.com:<owner>/nltk_data.git... | 0 |
public_repos/nltk_data | public_repos/nltk_data/tools/build_collections.py |
import os
import sys
from glob import glob
from typing import List
from xml.etree import ElementTree
from nltk.downloader import _indent_xml
if len(sys.argv) != 2:
print("Usage: ")
print("build_collections.py <path-to-packages>")
sys.exit(-1)
ROOT = sys.argv[1]
def write(file_name: str, coll_name: str, ... | 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/misc/perluniprops.xml | <package id="perluniprops" name="perluniprops: Index of Unicode Version 7.0.0 character properties in Perl"
webpage="http://perldoc.perl.org/perluniprops.html"
license=""
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/misc/mwa_ppdb.xml | <package id="mwa_ppdb" name="The monolingual word aligner (Sultan et al. 2015) subset of the Paraphrase Database."
webpage="http://www.cis.upenn.edu/~ccb/ppdb/"
license="Creative Commons Attribution 3.0 Unported (CC-BY)"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/unicode.notes | The following corpora contain a few non-ascii chars; but they appear
to basically just be typos and/or noisy data sources (i.e., there
might not even be a single encoding)
- treebank (treebank/raw/wsj_0142)
- abc (rural.txt and science.txt)
- webtext (pirates, wine, overheard)
- reuters (reuters/test/17980)
-... | 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/crubadan.xml | <package id="crubadan" name="Crubadan Corpus"
copyright="Copyright (C) 2010 Kevin Scannell"
author="Kevin Scannell"
license="GPLv3"
webpage="http://borel.slu.edu/crubadan/"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/chat80.xml | <package id="chat80" name="Chat-80 Data Files"
copyright="Copyright (C) 1982 David Warren and Fernando Pereira"
license="This program may be used, copied, altered or included in other programs only for academic purposes and provided that the authorship of the initial program is aknowledged. Use for c... | 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/cess_cat.xml | <package id="cess_cat" name="CESS-CAT Treebank"
webpage="http://clic.ub.edu/cessece/"
license="If you use these corpora for research, please cite thusly: CESS-Cat project (M. Antonia Martí, MarionaTaulé, Lluís Márquez, Manuel Bertran (2007) ?CESS-ECE: A Multilingual and Multilevel Annotated Corpus? in... | 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/wordnet2021.xml | <package id="wordnet2021" name="Open English Wordnet 2021"
version="2021"
license="This resource is derived from Princeton WordNet under the WordNet License and further developed under the Creative Commons Attribution 4.0 International License. You may share and adapt this resource providing attributi... | 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/framenet_v15.xml | <package id="framenet_v15" name="FrameNet 1.5"
author="Collin F. Baker"
license="May be used for non-commercial purposes."
webpage="http://framenet.icsi.berkeley.edu"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/swadesh.xml | <package id="swadesh" name="Swadesh Wordlists"
webpage="http://en.wiktionary.org/wiki/Appendix:Swadesh_list"
license="GNU Free Documentation License"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/genesis.xml | <package id="genesis" name="Genesis Corpus"
copyright="public domain"
license="public domain"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/propbank.xml | <package id="propbank" name="Proposition Bank Corpus 1.0"
contact="Martha Palmer"
webpage="http://verbs.colorado.edu/~mpalmer/projects/ace.html"
license="Distributed with permission"
unzip="0"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/nonbreaking_prefixes.xml | <package id="nonbreaking_prefixes" name="Non-Breaking Prefixes (Moses Decoder)"
webpage="https://github.com/moses-smt/mosesdecoder/tree/master/scripts/share/nonbreaking_prefixes"
license="Gnu LGPL"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/knbc.xml | <package id="knbc" name="KNB Corpus (Annotated blog corpus)"
webpage="http://lilyx.net/pages/nltkjapanesecorpus.html"
license="Freely re-distributable under the same license as the original KNB Corpus."
unzip="0" />
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/dependency_treebank.xml | <package id="dependency_treebank" name="Dependency Parsed Treebank"
sample="True"
copyright="Copyright (C) 1995 University of Pennsylvania"
license="This is a 10% fragment of Penn Treebank, (C) LDC 1995, which has been dependency parsed. It is made available under fair use for the purposes o... | 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/mte_teip5.xml | <package id="mte_teip5" name="MULTEXT-East 1984 annotated corpus 4.0"
author="Erjavec, Tomaž; Barbu, Ana-Maria; Derzhanski, Ivan; Dimitrova, Ludmila; Garabík, Radovan; Ide, Nancy; Kaalep, Heiki-Jaan; Kotsyba, Natalia; Krstev, Cvetana; Oravecz, Csaba; Petkevič, Vladimír; Priest-Dorman, Greg; QasemiZadeh, Behran... | 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/alpino.xml | <package id="alpino" name="Alpino Dutch Treebank"
webpage="http://www.let.rug.nl/~vannoord/trees/"
contact="Gertjan van Noord"
license="Distributed with permission of Gertjan van Noord"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/movie_reviews.xml | <package id="movie_reviews"
name="Sentiment Polarity Dataset Version 2.0"
author="Bo Pang and Lillian Lee"
copyright="Copyright (C) 2004 Bo Pang and Lillian Lee"
webpage="http://www.cs.cornell.edu/people/pabo/movie-review-data/"
license="Creative Commons Attribution 4.0 Internatio... | 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/brown.xml | <package id="brown" name="Brown Corpus"
author="W. N. Francis and H. Kucera"
license="May be used for non-commercial purposes."
webpage="http://www.hit.uib.no/icame/brown/bcm.html"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/comtrans.xml | <package id="comtrans" name="ComTrans Corpus Sample"
author="Reinhard Rapp"
webpage="http://www.fask.uni-mainz.de/user/rapp/comtrans/"
unzip="0"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/smultron.xml | <package id="smultron" name="SMULTRON Corpus Sample"
author="Sofia Gustafson-Capkova, Yvonne Samuelsson, and Martin Volk"
webpage="http://www.ling.su.se/DaLi/research/smultron/index.htm"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/toolbox.xml | <package id="toolbox"
name="Toolbox Sample Files"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/city_database.xml | <package id="city_database"
name="City Database"
note="A very small database of information about cities"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/webtext.xml | <package id="webtext"
name="Web Text Corpus"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/state_union.xml | <package id="state_union"
name="C-Span State of the Union Address Corpus"
webpage="http://www.c-span.org/executive/stateoftheunion.asp"
copyright="public domain"
license="public domain"
unzip="1"
/>
| 0 |
public_repos/nltk_data/packages | public_repos/nltk_data/packages/corpora/europarl_raw.xml | <package id="europarl_raw" name="Sample European Parliament Proceedings Parallel Corpus"
author="Philipp Koehn, University of Edinburgh"
webpage="http://www.statmt.org/europarl"
unzip="1"
/>
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.