采用
ChatGPT是OpenAI推出AI产品,官方介绍为Get instant answers, find creative inspiration, learn something new, 此处省去5千字介绍。
对于开发人员来说,我们觉得更需要了解以下一些知识:
- OpenAI API: https://platform.openai.com/docs/api-reference
- 提示工程(Prompt Engineering): 要学会如何更快更好地问问题,
Garbage in, garbage out是AI的哲学。 - Assistants Tools: 自定义的函数调用,之前名称为functions,现在命名为tools
使用AI时,System Message 扮演着非常重要的角色, 理论上你需要进行相关的设计,如下述就是一个Java项目的system message:
I am linux_china, a senior Java developer. I have strong experience with the following technology stacks:
- Language: Java 17
- Build tool: Apache Maven 3
- Frameworks: Spring Boot 3, Spring Cloud, Spring Data JPA
- Libraries:
- Apache Commons IO: a library of utilities to assist with developing IO functionality
- Apache Commons Codec: encoder and decoders for various formats such as Base64, digest and Hexadecimal
- Apache Commons Lang 3.0: helper utilities for the java.lang API, notably String manipulation methods, basic numerical methods, object reflection, concurrency, creation and serialization and System properties
- Guava: Google Core Libraries for Java, includes new collection types (such as multimap and multiset), immutable collections, a graph library, and utilities for concurrency, I/O, hashing, primitives, strings, and more!
- Jackson: Java JSON library with JSON serializer and deserializer by ObjectMapper
- MyBatis: first class persistence framework with support for custom SQL
- Database: PostgreSQL, Redis
- Messaging: Apache Kafka
- Unit Test: JUnit 5, AssertJ, DbUnit
- Architecture: Domain-Driven Design(DDD)
Now I'm developing a web application focusing on KMS(key management service).
对来项目来说,通常你需要描述好你个人的经验和项目相关的信息,这样AI就可以很好地进行回答。
当你完成system message后,在末尾添加一个新的一行:
Could you understand all of these technologies? If you have any questions, please let me know.
,然后发送给AI,如果有一些不明确的地方,可以再进行调整。
OpenAI Code Interpreter
Code Interpreter是OpenAI推出的一个新功能, 可以帮助你生成并执行代码。 OpenAI Code Interpreter沙箱的环境和支持的地方开发包如下:
- Python版本:3.11.8
- Package列表:https://github.com/simonw/scrape-openai-code-interpreter/blob/main/packages.txt
ChatGPT & Friends
- Claude.ai: https://claude.ai/
- LangChain: https://github.com/langchain-ai/langchain
- FaceBook LLaMA: https://llama.meta.com/
- Google Gemini: https://gemini.google.com/
- X AI: Grok - https://x.ai/
- A lot ...
References
- ChatGPT: https://openai.com/chatgpt
- OpenAI API: https://platform.openai.com/docs/api-reference
- Assistants Tools: https://platform.openai.com/docs/assistants/tools
- LLM Visualization: https://bbycroft.net/llm