Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

tgi

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tgi - npm Package Compare versions

Comparing version
1.4.5
to
2.0.2
+1
-1
PKG-INFO
Metadata-Version: 2.1
Name: tgi
Version: 1.4.5
Version: 2.0.2
Summary: Nightly release of Hugging Face Text Generation Python Client

@@ -5,0 +5,0 @@ Home-page: https://github.com/huggingface/text-generation-inference

[tool.poetry]
name = "tgi"
version = "1.4.5"
version = "2.0.2"
description = "Nightly release of Hugging Face Text Generation Python Client"

@@ -5,0 +5,0 @@ license = "Apache-2.0"

@@ -83,2 +83,3 @@ import json

tools: Optional[List[Tool]] = None,
tool_prompt: Optional[str] = None,
tool_choice: Optional[str] = None,

@@ -123,2 +124,4 @@ ):

List of tools to use
tool_prompt (`str`):
A prompt to be appended before the tools
tool_choice (`str`):

@@ -144,2 +147,3 @@ The tool to use

tools=tools,
tool_prompt=tool_prompt,
tool_choice=tool_choice,

@@ -472,2 +476,3 @@ )

tools: Optional[List[Tool]] = None,
tool_prompt: Optional[str] = None,
tool_choice: Optional[str] = None,

@@ -512,2 +517,4 @@ ) -> Union[ChatComplete, AsyncIterator[ChatCompletionChunk]]:

List of tools to use
tool_prompt (`str`):
A prompt to be appended before the tools
tool_choice (`str`):

@@ -533,2 +540,3 @@ The tool to use

tools=tools,
tool_prompt=tool_prompt,
tool_choice=tool_choice,

@@ -535,0 +543,0 @@ )

@@ -62,2 +62,13 @@ from enum import Enum

class CompletionComplete(BaseModel):
# Index of the chat completion
index: int
# Message associated with the chat completion
text: str
# Log probabilities for the chat completion
logprobs: Optional[Any]
# Reason for completion
finish_reason: str
class Function(BaseModel):

@@ -108,2 +119,12 @@ name: Optional[str]

class Completion(BaseModel):
# Completion details
id: str
object: str
created: int
model: str
system_fingerprint: str
choices: List[CompletionComplete]
class ChatRequest(BaseModel):

@@ -143,2 +164,4 @@ # Model identifier

tools: Optional[List[Tool]] = None
# A prompt to be appended before the tools
tool_prompt: Optional[str] = None
# Choice of tool to be used

@@ -145,0 +168,0 @@ tool_choice: Optional[str] = None