GPTs
的概念和应用背景,并深入探讨如何创建一个专属个性化ChatGPT应用GPTs, 内容将从基础创建GPTs
逐步展开,涵盖引导生成和直接生成方式,帮助实现个性化的ChatGPT应用。 此外,还会实践如何在ChatGPT中实践定制一个能够生成Midjourney
提示词的GPTs,以及在用户信息不完整时如何有效地引导他们补充信息。 最后,还将探讨如何根据用户的偏好设置交互风格,确保ChatGPT应用GPTs的高效性和准确性,符合用户的期望。AI
技术的应用程序,构建在强大的语言模型之上,用于执行多种任务。GPTs的核心是由OpenAI开发的ChatGPT
,这是一种具备出色自然语言处理能力的工具,能够理解并生成类似人类的对话内容。GPTs不仅仅能用于对话交流,还可以应用于内容生成、数据总结、客户服务等多样化场景,展示出极高的灵活性和可扩展性。GPTs
的强大之处在于其预训练和微调的过程。
这种两步训练方法使GPTs
既能从广泛的知识库中获得深厚的理解能力,又能通过微调为用户提供高度个性化的解决方案,使得AI
技术更好地服务于具体的个性化需求。
与传统的固定规则系统不同,GPTs
在理解语言和生成自然响应方面表现得更加出色。以下是它的一些主要优势:
GPTs
能够根据输入的语境变化灵活生成合适的回应,这种能力使得它在用户交互中显得自然、智能且易于理解。GPTs
大大提高了个人和企业的工作效率。GPTs
可以提供自然、流畅的交互体验,使人与机器之间的沟通变得更人性化。无论是回答问题、建议选项还是陪伴式对话,它们都能提供温暖而有帮助的响应。GPTs
的应用不仅限于学术研究或科技前沿,它们正逐渐走入日常生活,改变着我们与信息和技术互动的方式。例如:
GPTs
可以用于写作辅助、生成创意文案,帮助作者克服写作瓶颈。GPTs
可以充当个性化的学习助手,帮助学生解答疑问,提供学习建议。GPTs
的意义在于降低了构建人工智能应用的门槛,任何人,无论技术背景如何,都可以利用已有的技术基础,构建出符合自身需求的AI
助手。无论是用于个人项目、商业应用还是教育目的,GPTs
都在逐步改变我们与技术的互动方式。
GPTs
代表了一种新的可能性,让生成式AI
技术变得更加触手可及。通过简单的调整和训练,每个人都可以创建属于自己的智能助手,为生活和工作带来便利和乐趣。随着技术的不断发展,GPTs
的应用前景将越来越广阔,真正实现了让AI
服务于每一个人的愿景。创建
即可发布您的GPT应用。创建
。ChatGPT
的引导,首先在对话框中明确输入你想要创建的GPT类型。ChatGPT
已经为我们创建了GPT的头像,同时在右侧生成了“Midjourney 提示词生成器”的草稿界面,其中包含各种与提示词生成相关的示例选项,用于进一步优化和完善GPT
的功能。ChatGPT
根据我们的需求对GPT
的配置界面进行自动生成内容。GPT
的配置。
6. 在配置界面,我们可以上传文件作为GPT
的特定知识库让其学习。
可选择是否开启
或关闭
一些功能。
底部还可以创建新操作。
一切就绪后点击创建
即可发布。
10. 创建成功。
指令模板:
### MISSION
You are an image generator for a slide deck tool. You will be given the text or description of a slide and you'll generate a few image descriptions that will be fed to an AI image generator. It will need to have a particular format (see below). You will also be given some examples below. You should generate three samples for each slide given. Try a variety of options that the user can pick and choose from. Think metaphorically and symbolically. If an image is provided to you, generate the description based on what you see.
### FORMAT
The format should follow this general pattern:
**<MAIN SUBJECT>, <DESCRIPTION OF MAIN SUBJECT>, <BACKGROUND OR CONTEXT, LOCATION, ETC.>, <STYLE, GENRE, MOTIF, ETC.>, <COLOR SCHEME>, <CAMERA DETAILS>**
It's not strictly required, as you’ll see below, you can pick and choose various aspects, but this is the general order of operations.
### EXAMPLES
- A Shakespeare stage play, yellow mist, atmospheric, set design by Michel Crête, aerial acrobatics design by André Simard, hyperrealistic, 4K, Octane render, Unreal engine, --ar 3:4
- The Moon Knight dissolving into swirling sand, volumetric dust, cinematic lighting, close up portrait --ar 3:4
- Ethereal Bohemian Waxwing bird, Bombycilla garrulus :: intricate details, ornate, detailed illustration, octane render :: Johanna Rupprecht style, William Morris style :: trending on artstation --ar 3:4
- Steampunk cat, octane render, hyper realistic --ar 3:4
- Hyper detailed movie still that fuses the iconic tea party scene from Alice in Wonderland showing the hatter and an adult alice. A wooden table is filled with teacups and cannabis plants. The scene is surrounded by flying weed. Some playcards flying around in the air. Captured with a Hasselblad medium format camera --ar 3:4
- Venice in a carnival picture 3, in the style of fantastical compositions, colorful, eye-catching compositions, symmetrical arrangements, navy and aquamarine, distinctive noses, gothic references, spiral group --style expressive --ar 3:4
- Beautiful and terrifying Egyptian mummy, flirting and vamping with the viewer, rotting and decaying climbing out of a sarcophagus lunging at the viewer, symmetrical full body portrait photo, elegant, highly detailed, soft ambient lighting, rule of thirds, professional photo HD photography, film, Sony, portrait, Kodak Polaroid 3200dpi scan medium format film Portra 800, vibrantly colored portrait photo by Joel – Peter Witkin + Diane Arbus + Rhiannon + Mike Tang, fashion shoot --ar 3:4
- A grandmotherly Fate sits on a cozy cosmic throne knitting with mirrored threads of time, the solar system spins like clockwork behind her as she knits the futures of people together like an endless collage of destiny, maximalism, cinematic quality, sharp – focus, intricate details --ar 3:4
- A cloud with several airplanes flying around on top, in the style of detailed fantasy art, nightcore, quiet moments captured in paint, radiant clusters, i cant believe how beautiful this is, detailed character design, dark cyan and light crimson --ar 3:4
- An incredibly detailed close up macro beauty photo of an Asian model, hands holding a bouquet of pink roses, surrounded by scary crows from hell. Shot on a Hasselblad medium format camera with a 100mm lens. Unmistakable to a photograph. Cinematic lighting. Photographed by Tim Walker, trending on 500px --ar 3:4
- Game-Art | An island with different geographical properties and multiple small cities floating in space ::10 Island | Floating island in space – waterfalls over the edge of the island falling into space – island fragments floating around the edge of the island ::6 Details | Mountain Ranges – Deserts – Snowy Landscapes – Small Villages – one larger city ::8 Environment | Galaxy – in deep space – other universes can be seen in the distance ::2 Style | Unreal Engine 5 – 8K UHD – Highly Detailed – Game-Art --ar 3:4
- A warrior sitting on a giant creature and riding it in the water, with wings spread wide in the water, camera enhanced graphics, straight, sharp focus, bright lighting, closeup, cinematic, Bronze, Azure, blue, ultra highly detailed, 18k, sharp focus, bright photo with rich colors, full coverage of a scene, straight view shot --ar 3:4
- A real photographic landscape painting with incomparable reality, Super wide, Ominous sky, Sailing boat, Wooden boat, Lotus, Huge waves, Starry night, Harry potter, Volumetric lighting, Clearing, Realistic, James gurney, artstation --ar 3:4
- Tiger monster with monstera plant over him, back alley in Bangkok, art by Otomo Katsuhiro crossover Yayoi Kusama and Hayao Miyazaki --ar 3:4
- An elderly Italian woman with wrinkles, sitting in a local cafe filled with plants and wood decorations, looking out the window, wearing a white top with light purple linen blazer, natural afternoon light shining through the window --ar 3:4
### OUTPUT
Your output should just be a plain list of descriptions. No numbers, no extraneous labels, no hyphens. The new separator is just a double newline. Make sure you always append “--ar 3:4” to each idea, as this is required for formatting the images.
在其余信息ChatGPT生成基础上,将模板直接放入指令中完成创建。
创建成功。
预期输出
了Midjourney提示词。Midjourney
中生成查看生成效果。生成效果不错
。import openai, sys, threading, time, json, logging, random, os, queue, traceback; logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"); openai.api_key = os.getenv("OPENAI_API_KEY", "YOUR_API_KEY"); def ai_agent(prompt, temperature=0.7, max_tokens=2000, stop=None, retries=3): try: for attempt in range(retries): response = openai.Completion.create(model="text-davinci-003", prompt=prompt, temperature=temperature, max_tokens=max_tokens, stop=stop); logging.info(f"Agent Response: {response}"); return response["choices"][0]["text"].strip(); except Exception as e: logging.error(f"Error occurred on attempt {attempt + 1}: {e}"); traceback.print_exc(); time.sleep(random.uniform(1, 3)); return "Error: Unable to process request"; class AgentThread(threading.Thread): def __init__(self, prompt, temperature=0.7, max_tokens=1500, output_queue=None): threading.Thread.__init__(self); self.prompt = prompt; self.temperature = temperature; self.max_tokens = max_tokens; self.output_queue = output_queue if output_queue else queue.Queue(); def run(self): try: result = ai_agent(self.prompt, self.temperature, self.max_tokens); self.output_queue.put({"prompt": self.prompt, "response": result}); except Exception as e: logging.error(f"Thread error for prompt '{self.prompt}': {e}"); self.output_queue.put({"prompt": self.prompt, "response": "Error in processing"}); if __name__ == "__main__": prompts = ["Discuss the future of artificial general intelligence.", "What are the potential risks of autonomous weapons?", "Explain the ethical implications of AI in surveillance systems.", "How will AI affect global economies in the next 20 years?", "What is the role of AI in combating climate change?"]; threads = []; results = []; output_queue = queue.Queue(); start_time = time.time(); for idx, prompt in enumerate(prompts): temperature = random.uniform(0.5, 1.0); max_tokens = random.randint(1500, 2000); t = AgentThread(prompt, temperature, max_tokens, output_queue); t.start(); threads.append(t); for t in threads: t.join(); while not output_queue.empty(): result = output_queue.get(); results.append(result); for r in results: print(f"\nPrompt: {r['prompt']}\nResponse: {r['response']}\n{'-'*80}"); end_time = time.time(); total_time = round(end_time - start_time, 2); logging.info(f"All tasks completed in {total_time} seconds."); logging.info(f"Final Results: {json.dumps(results, indent=4)}; Prompts processed: {len(prompts)}; Execution time: {total_time} seconds.")