SYMBOL INDEX (194 symbols across 31 files) FILE: Intel_device_demo/ipex_llm_cpu_demo/api_server.py function lifespan (line 60) | async def lifespan(app: FastAPI): class ModelCard (line 78) | class ModelCard(BaseModel): class ModelList (line 88) | class ModelList(BaseModel): class FunctionCallResponse (line 93) | class FunctionCallResponse(BaseModel): class ChatMessage (line 98) | class ChatMessage(BaseModel): class DeltaMessage (line 105) | class DeltaMessage(BaseModel): class EmbeddingRequest (line 112) | class EmbeddingRequest(BaseModel): class CompletionUsage (line 117) | class CompletionUsage(BaseModel): class EmbeddingResponse (line 123) | class EmbeddingResponse(BaseModel): class UsageInfo (line 132) | class UsageInfo(BaseModel): class ChatCompletionRequest (line 138) | class ChatCompletionRequest(BaseModel): class ChatCompletionResponseChoice (line 149) | class ChatCompletionResponseChoice(BaseModel): class ChatCompletionResponseStreamChoice (line 155) | class ChatCompletionResponseStreamChoice(BaseModel): class ChatCompletionResponse (line 161) | class ChatCompletionResponse(BaseModel): function health (line 171) | async def health() -> Response: function get_embeddings (line 177) | async def get_embeddings(request: EmbeddingRequest): function list_models (line 211) | async def list_models(): function create_chat_completion (line 221) | async def create_chat_completion(request: ChatCompletionRequest): function predict (line 338) | async def predict(model_id: str, params: dict): function predict_stream (line 404) | def predict_stream(model_id, gen_params): function parse_output_text (line 484) | async def parse_output_text(model_id: str, value: str): function contains_custom_function (line 510) | def contains_custom_function(value: str) -> bool: FILE: Intel_device_demo/ipex_llm_cpu_demo/chatglm3_web_demo.py function get_model (line 34) | def get_model(): FILE: Intel_device_demo/ipex_llm_cpu_demo/openai_api_request.py function function_chat (line 20) | def function_chat(): function simple_chat (line 56) | def simple_chat(use_stream=True): FILE: Intel_device_demo/ipex_llm_cpu_demo/utils.py class InvalidScoreLogitsProcessor (line 9) | class InvalidScoreLogitsProcessor(LogitsProcessor): method __call__ (line 10) | def __call__( function process_response (line 19) | def process_response(output: str, use_tool: bool = False) -> Union[str, ... function generate_stream_chatglm3 (line 47) | def generate_stream_chatglm3(model: PreTrainedModel, tokenizer: PreTrain... function process_chatglm_messages (line 122) | def process_chatglm_messages(messages, tools=None): function generate_chatglm3 (line 159) | def generate_chatglm3(model: PreTrainedModel, tokenizer: PreTrainedToken... function apply_stopping_strings (line 165) | def apply_stopping_strings(reply, stop_strings) -> Tuple[str, bool]: FILE: Intel_device_demo/openvino_demo/openvino_cli_demo.py function parse_text (line 10) | def parse_text(text): class StopOnTokens (line 42) | class StopOnTokens(StoppingCriteria): method __init__ (line 43) | def __init__(self, token_ids): method __call__ (line 46) | def __call__( function convert_history_to_token (line 102) | def convert_history_to_token(history: List[Tuple[str, str]]): FILE: basic_demo/cli_batch_request_demo.py function batch (line 11) | def batch( function main (line 50) | def main(batch_queries): FILE: basic_demo/cli_demo.py function build_prompt (line 20) | def build_prompt(history): function main (line 28) | def main(): FILE: basic_demo/cli_demo_bad_word_ids.py function build_prompt (line 37) | def build_prompt(history): function main (line 44) | def main(): FILE: basic_demo/web_demo_gradio.py function _resolve_path (line 48) | def _resolve_path(path: Union[str, Path]) -> Path: function load_model_and_tokenizer (line 52) | def load_model_and_tokenizer( class StopOnTokens (line 75) | class StopOnTokens(StoppingCriteria): method __call__ (line 76) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... function parse_text (line 84) | def parse_text(text): function predict (line 115) | def predict(history, max_length, top_p, temperature, system_prompt): function user (line 173) | def user(query, history): FILE: basic_demo/web_demo_streamlit.py function get_model (line 29) | def get_model(): FILE: composite_demo/client.py function get_client (line 25) | def get_client() -> Client: class Client (line 30) | class Client(Protocol): method generate_stream (line 31) | def generate_stream(self, function stream_chat (line 40) | def stream_chat( class HFClient (line 125) | class HFClient(Client): method __init__ (line 126) | def __init__(self, model_path: str, tokenizer_path: str, pt_checkpoint... method generate_stream (line 155) | def generate_stream( FILE: composite_demo/conversation.py class Role (line 11) | class Role(Enum): method __str__ (line 19) | def __str__(self): method get_message (line 31) | def get_message(self): class Conversation (line 52) | class Conversation: method __str__ (line 58) | def __str__(self) -> str: method get_text (line 69) | def get_text(self) -> str: method show (line 81) | def show(self, placeholder: DeltaGenerator | None=None) -> str: function preprocess_text (line 92) | def preprocess_text( function postprocess_text (line 110) | def postprocess_text(text: str) -> str: FILE: composite_demo/demo_chat.py function append_conversation (line 11) | def append_conversation( function main (line 20) | def main( FILE: composite_demo/demo_ci.py class CodeKernel (line 24) | class CodeKernel(object): method __init__ (line 25) | def __init__(self, method execute (line 71) | def execute(self, code): method execute_interactive (line 91) | def execute_interactive(self, code, verbose=False): method inspect (line 100) | def inspect(self, code, verbose=False): method get_error_msg (line 110) | def get_error_msg(self, msg, verbose=False) -> str | None: method check_msg (line 124) | def check_msg(self, msg, verbose=False): method shutdown (line 134) | def shutdown(self): method restart (line 142) | def restart(self): method interrupt (line 147) | def interrupt(self): method is_alive (line 152) | def is_alive(self): function b64_2_img (line 156) | def b64_2_img(data): function clean_ansi_codes (line 161) | def clean_ansi_codes(input_string): function execute (line 166) | def execute(code, kernel: CodeKernel) -> tuple[str, str | Image.Image]: function get_kernel (line 203) | def get_kernel(): function extract_code (line 208) | def extract_code(text: str) -> str: function append_conversation (line 215) | def append_conversation( function main (line 224) | def main( FILE: composite_demo/demo_tool.py function tool_call (line 31) | def tool_call(*args, **kwargs) -> dict: function yaml_to_dict (line 39) | def yaml_to_dict(tools: str) -> list[dict] | None: function extract_code (line 46) | def extract_code(text: str) -> str: function append_conversation (line 54) | def append_conversation( function main (line 63) | def main( FILE: composite_demo/main.py class Mode (line 26) | class Mode(str, Enum): FILE: composite_demo/tool_registry.py function register_tool (line 19) | def register_tool(func: callable): function dispatch_tool (line 56) | def dispatch_tool(tool_name: str, tool_params: dict) -> str: function get_tools (line 67) | def get_tools() -> dict: function random_number_generator (line 74) | def random_number_generator( function get_weather (line 93) | def get_weather( function get_shell (line 120) | def get_shell( FILE: finetune_demo/finetune_hf.py class DataCollatorForSeq2Seq (line 42) | class DataCollatorForSeq2Seq(_DataCollatorForSeq2Seq): method __call__ (line 43) | def __call__(self, features, return_tensors=None): class Seq2SeqTrainer (line 70) | class Seq2SeqTrainer(_Seq2SeqTrainer): method prediction_step (line 71) | def prediction_step( function _resolve_path (line 106) | def _resolve_path(path: Union[str, Path]) -> Path: function _sanity_check (line 110) | def _sanity_check( function _get_yaml_parser (line 127) | def _get_yaml_parser() -> yaml.YAML: class DataConfig (line 135) | class DataConfig(object): method data_format (line 143) | def data_format(self) -> str: method data_files (line 147) | def data_files(self) -> dict[NamedSplit, str]: class FinetuningConfig (line 159) | class FinetuningConfig(object): method __post_init__ (line 170) | def __post_init__(self): method from_dict (line 183) | def from_dict(cls, **kwargs) -> 'FinetuningConfig': method from_file (line 206) | def from_file(cls, path: Union[str, Path]) -> 'FinetuningConfig': function _load_datasets (line 212) | def _load_datasets( class DataManager (line 232) | class DataManager(object): method __init__ (line 233) | def __init__(self, data_dir: str, data_config: DataConfig): method _get_dataset (line 243) | def _get_dataset(self, split: NamedSplit) -> Optional[Dataset]: method get_dataset (line 246) | def get_dataset( function print_model_size (line 269) | def print_model_size(model: PreTrainedModel): function process_batch (line 275) | def process_batch( function process_batch_eval (line 329) | def process_batch_eval( function _prepare_model_for_training (line 378) | def _prepare_model_for_training(model: nn.Module, use_cpu: bool): function load_tokenizer_and_model (line 384) | def load_tokenizer_and_model( function compute_metrics (line 419) | def compute_metrics(eval_preds: EvalPrediction, tokenizer: PreTrainedTok... function main (line 443) | def main( FILE: finetune_demo/inference_hf.py function _resolve_path (line 23) | def _resolve_path(path: Union[str, Path]) -> Path: function load_model_and_tokenizer (line 27) | def load_model_and_tokenizer(model_dir: Union[str, Path]) -> tuple[Model... function main (line 46) | def main( FILE: langchain_demo/ChatGLM3.py class ChatGLM3 (line 8) | class ChatGLM3(LLM): method __init__ (line 18) | def __init__(self): method _llm_type (line 22) | def _llm_type(self) -> str: method load_model (line 25) | def load_model(self, model_name_or_path=None): method _tool_history (line 37) | def _tool_history(self, prompt: str): method _extract_observation (line 81) | def _extract_observation(self, prompt: str): method _extract_tool (line 89) | def _extract_tool(self): method _call (line 127) | def _call(self, prompt: str, history: List = [], stop: Optional[List[s... FILE: langchain_demo/tools/Calculator.py class CalculatorInput (line 8) | class CalculatorInput(BaseModel): class Calculator (line 12) | class Calculator(BaseTool, abc.ABC): method __init__ (line 17) | def __init__(self): method parameter_validation (line 20) | def parameter_validation(self, para: str): method _run (line 34) | def _run(self, calculation: str) -> str: FILE: langchain_demo/tools/DistanceConversion.py class DistanceConversionInput (line 7) | class DistanceConversionInput(BaseModel): class DistanceConverter (line 13) | class DistanceConverter(BaseTool, abc.ABC): method __init__ (line 18) | def __init__(self): method _run (line 21) | def _run(self, distance: float, unit: str, to_unit: str) -> str: FILE: langchain_demo/tools/Weather.py class WeatherInput (line 8) | class WeatherInput(BaseModel): class Weather (line 12) | class Weather(BaseTool): method __init__ (line 17) | def __init__(self): method _run (line 20) | def _run(self, location: str) -> dict[str, Any]: FILE: openai_api_demo/api_server.py function lifespan (line 62) | async def lifespan(app: FastAPI): class ModelCard (line 80) | class ModelCard(BaseModel): class ModelList (line 90) | class ModelList(BaseModel): class FunctionCallResponse (line 95) | class FunctionCallResponse(BaseModel): class ChatMessage (line 100) | class ChatMessage(BaseModel): class DeltaMessage (line 107) | class DeltaMessage(BaseModel): class EmbeddingRequest (line 114) | class EmbeddingRequest(BaseModel): class CompletionUsage (line 119) | class CompletionUsage(BaseModel): class EmbeddingResponse (line 125) | class EmbeddingResponse(BaseModel): class UsageInfo (line 134) | class UsageInfo(BaseModel): class ChatCompletionRequest (line 140) | class ChatCompletionRequest(BaseModel): class ChatCompletionResponseChoice (line 151) | class ChatCompletionResponseChoice(BaseModel): class ChatCompletionResponseStreamChoice (line 157) | class ChatCompletionResponseStreamChoice(BaseModel): class ChatCompletionResponse (line 163) | class ChatCompletionResponse(BaseModel): function health (line 173) | async def health() -> Response: function get_embeddings (line 179) | async def get_embeddings(request: EmbeddingRequest): function list_models (line 216) | async def list_models(): function create_chat_completion (line 226) | async def create_chat_completion(request: ChatCompletionRequest): function predict (line 343) | async def predict(model_id: str, params: dict): function predict_stream (line 409) | def predict_stream(model_id, gen_params): function parse_output_text (line 489) | async def parse_output_text(model_id: str, value: str): function contains_custom_function (line 515) | def contains_custom_function(value: str) -> bool: FILE: openai_api_demo/langchain_openai_api.py function get_ai_response (line 16) | def get_ai_response(messages, user_input): function continuous_conversation (line 28) | def continuous_conversation(): FILE: openai_api_demo/openai_api_request.py function function_chat (line 19) | def function_chat(): function simple_chat (line 55) | def simple_chat(use_stream=True): function embedding (line 86) | def embedding(): FILE: openai_api_demo/utils.py class InvalidScoreLogitsProcessor (line 9) | class InvalidScoreLogitsProcessor(LogitsProcessor): method __call__ (line 10) | def __call__( function process_response (line 19) | def process_response(output: str, use_tool: bool = False) -> Union[str, ... function generate_stream_chatglm3 (line 46) | def generate_stream_chatglm3(model: PreTrainedModel, tokenizer: PreTrain... function process_chatglm_messages (line 122) | def process_chatglm_messages(messages, tools=None): function generate_chatglm3 (line 164) | def generate_chatglm3(model: PreTrainedModel, tokenizer: PreTrainedToken... function apply_stopping_strings (line 170) | def apply_stopping_strings(reply, stop_strings) -> Tuple[str, bool]: FILE: tensorrt_llm_demo/tensorrt_llm_cli_demo.py function find_engines (line 44) | def find_engines(dir: Path, model_name: str = "*", dtype: str = "*", tp_... function parse_arguments (line 61) | def parse_arguments(args=None): function main (line 85) | def main(): FILE: tools_using_demo/cli_demo_tool.py function build_prompt (line 21) | def build_prompt(history): function main (line 103) | def main(): FILE: tools_using_demo/openai_api_demo.py function run_conversation (line 18) | def run_conversation(query: str, stream=False, tools=None, max_retry=5): FILE: tools_using_demo/tool_register.py function register_tool (line 15) | def register_tool(func: callable): function dispatch_tool (line 53) | def dispatch_tool(tool_name: str, tool_params: dict) -> str: function get_tools (line 64) | def get_tools() -> dict: function random_number_generator (line 71) | def random_number_generator( function get_weather (line 90) | def get_weather(