Skip to content

Instantly share code, notes, and snippets.

View kao0312's full-sized avatar
πŸ‰

kao0312 kao0312

πŸ‰
View GitHub Profile
@kao0312
kao0312 / ex.py
Created May 21, 2025 15:06
[Unity]Cummy Bender game text extractor&injector
import os, json, re
from collections import OrderedDict
def extract_names_and_texts(directory):
names = []
texts = []
seen_names = set() # εŽ»ι‡
seen_texts = set()
@kao0312
kao0312 / StreamGPTChat.py
Last active November 13, 2023 08:46
A Python script that engages in real-time conversation with GPT, featuring a typewriter effect for streamed responses.
import openai, time
openai.api_base = "https://api.openai.com/v1"
openai.api_key = "your_key"
model_engine = "gpt-3.5-turbo-1106"
def chat_with_gpt_streaming(prompt):
try:
response = openai.ChatCompletion.create(
model=model_engine,