A set of programming examples on how to use large language models for development.
This is a simple test example of calling the GPT API.
This is a simple test example of calling the deepseek API from Siliconflow.
This is a simple test example of how to use api to get response from ollama.
This is a simple test example of calling GPT API with streaming output and color display.
This is a simple example of using Python HTTP library to send POST requests to call the GPT API.
This is a simple sentiment analysis example using dashscope with prompt.
This is a simple example of using dashscope multimodal model to extract text content from images.
This is a simple example of of web search using OpenAI compatible API.
This is a simple example of of how to use local model.
This is an example utilizing GPT prompt for Natural Language Understanding (NLU).
This is an example utilizing GPT multi-turn dialogue for Dialogue State Tracking (DST).
In this example, NLU and NLG utilize GPT, while DST, database querying, and dialogue strategies are self-implemented.
Implementing a complete customer service functionality solely using OpenAI API.
Example of Chain of Thoughts (CoT), an emergent capability of large language models.
A means of countering "hallucinations". Similar to how we verify math problems through multiple checks.
An example of Tree-of-Thought (ToT).
Prevent Prompt Attacks Example 1.
Prevent Prompt Attacks Example 2.
Example of Content Moderation: Moderation API.
Important Parameters of the OpenAI API.
Let ChatGPT help you write Prompt.
Example of Function Calling in Simple Math.
Example of Multiple Function Calling.
An example of obtaining JSON structure with Function Calling.
An example of querying a database using Function Calling.
An example of implementing multi-table queries using Function Calling.
Stream Mode Example.
An example of a mobile phone package customer service robot based on Function Calling.
Simple example of function calling using dashscope to get weather information.
Simple example of function calling using dashscope to get database server status.
RAG preparation: An example of document loading and splitting.
RAG: An example of a retrieval-based question answering model based on ES.
An example of calculating the similarity between vectors.
RAG example based on vector retrieval. Here we use openai's embedding and dialogue interface.
RAG example based on vector search. Here we use Wenxin Qianfan's embedding and dialogue interface.
RAG example based on vector search. Here we use the embedding and dialogue interface of 360 Zhi Nao.
RAG example based on local chroma vector library (non-memory mode).
An example of RAG that cuts text in a certain granularity and partially overlaps to make the context more complete.
RAG Hybrid Search Example.
Example of local deployment of RAG vector model.
Example of processing tables in a PDF document using RAG.
An example of RAG (Retrieval-Augmented Generation) improving retrieval efficiency by generating multiple queries.
This is an example that includes some simple tensor operations and demonstrates the use of a GPU to accelerate training.
This is an example of a PyTorch project that is accelerated by a GPU.
A text-based game where you play as a boyfriend trying to apologize to your angry girlfriend.