# 파이썬 코드 2줄로 ChatGPT 이용하기

> Clean Markdown view of GeekNews topic #8613. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=8613](https://news.hada.io/topic?id=8613)
- GeekNews Markdown: [https://news.hada.io/topic/8613.md](https://news.hada.io/topic/8613.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2023-03-05T10:52:02+09:00
- Updated: 2023-03-05T10:52:02+09:00
- Original source: [imgur.com](https://imgur.com/a/cw6TZl5)
- Points: 13
- Comments: 0

## Topic Body

openai 모듈 import 후 쉽게 이용 가능   
```python  
def query_gpt_35_turbo(query):  
  response = openai.ChatCompletion.create(  
    model="gpt-3.5-turbo"  
    messages=[{"role": "system", "content":"You are a helpful assistant that helps users generate ..."},  
    {"role":"user", "content": query}]  
  )  
  return response.choices[0].message.content

## Comments



_No public comments on this page._
