openfree commited on
Commit
1954a4a
ยท
verified ยท
1 Parent(s): f3c71e4

Update my_functions.py

Browse files
Files changed (1) hide show
  1. my_functions.py +8 -10
my_functions.py CHANGED
@@ -1,6 +1,6 @@
1
  import yfinance as yf
2
 
3
- # ์˜ˆ์‹œ์šฉ ์ œํ’ˆ ์นดํƒˆ๋กœ๊ทธ
4
  product_catalog = {
5
  "807ZPKBL9V": "SuperWidget",
6
  "1234567890": "MegaGadget"
@@ -23,15 +23,12 @@ def get_stock_price(ticker: str) -> float:
23
  return float('nan')
24
 
25
  # ----------------------------------------------------
26
- # ์ƒˆ๋กญ๊ฒŒ ์ถ”๊ฐ€๋œ MCO ์•„ํ‚คํ…์ฒ˜ ๋ถ„์„์šฉ ํ•จ์ˆ˜ (์˜ˆ์‹œ)
27
  # ----------------------------------------------------
28
  def analyze_mco_architecture(framework_version: str, detail_level: int = 3) -> str:
29
  """
30
  MCO ์•„ํ‚คํ…์ฒ˜(ํ•จ์ˆ˜ JSON + Python ๋ชจ๋“ˆ) ๊ตฌ์กฐ๋ฅผ ๋ถ„์„ ๋ฐ ์š”์•ฝํ•ด์ฃผ๋Š” ํ•จ์ˆ˜.
31
- framework_version: (์˜ˆ: 'v2.1')
32
- detail_level: ๋ถ„์„ ์ƒ์„ธ๋„ (1~5)
33
  """
34
- # ์ž…๋ ฅ ๋ฒ”์œ„ ๋ณด์ •
35
  if detail_level < 1:
36
  detail_level = 1
37
  elif detail_level > 5:
@@ -47,11 +44,12 @@ def analyze_mco_architecture(framework_version: str, detail_level: int = 3) -> s
47
  return analysis
48
 
49
  # ----------------------------------------------------
50
- # ์ƒˆ๋กœ ์ถ”๊ฐ€๋œ product_details ํ•จ์ˆ˜
 
51
  # ----------------------------------------------------
52
- def product_details(product_id: str) -> str:
53
  """
54
- Looks up product details by product_id (์˜ˆ: ์ด๋ฆ„, ๊ฐ€๊ฒฉ, ํŠน์ง• ๋“ฑ)
 
55
  """
56
- # ์—ฌ๊ธฐ์„œ๋Š” ๊ฐ„๋‹จํžˆ product_catalog๋ฅผ ํ™œ์šฉํ•ด ์ด๋ฆ„๋งŒ ๋ฐ˜ํ™˜
57
- return product_catalog.get(product_id, "Unknown product")
 
1
  import yfinance as yf
2
 
3
+ # ์ƒ˜ํ”Œ์šฉ Catalog
4
  product_catalog = {
5
  "807ZPKBL9V": "SuperWidget",
6
  "1234567890": "MegaGadget"
 
23
  return float('nan')
24
 
25
  # ----------------------------------------------------
26
+ # MCO ์•„ํ‚คํ…์ฒ˜ ๋ถ„์„์šฉ ํ•จ์ˆ˜ (์˜ˆ์‹œ)
27
  # ----------------------------------------------------
28
  def analyze_mco_architecture(framework_version: str, detail_level: int = 3) -> str:
29
  """
30
  MCO ์•„ํ‚คํ…์ฒ˜(ํ•จ์ˆ˜ JSON + Python ๋ชจ๋“ˆ) ๊ตฌ์กฐ๋ฅผ ๋ถ„์„ ๋ฐ ์š”์•ฝํ•ด์ฃผ๋Š” ํ•จ์ˆ˜.
 
 
31
  """
 
32
  if detail_level < 1:
33
  detail_level = 1
34
  elif detail_level > 5:
 
44
  return analysis
45
 
46
  # ----------------------------------------------------
47
+ # [์ถ”๊ฐ€] functionName(...)
48
+ # - ๋ชจ๋ธ์ด functionName(string="AAPL")๋ผ๊ณ  ์ฝœํ•˜๋ฉด ๋‚ด๋ถ€์ ์œผ๋กœ get_stock_price(ticker=string)์„ ํ˜ธ์ถœ.
49
  # ----------------------------------------------------
50
+ def functionName(string: str) -> float:
51
  """
52
+ ์ž„์‹œ ํ˜ธํ™˜์šฉ ํ•จ์ˆ˜.
53
+ ๋ชจ๋ธ์ด functionName(string="...")์„ ํ˜ธ์ถœํ•˜๋ฉด, get_stock_price(ticker=...)๋ฅผ ๋Œ€์‹  ํ˜ธ์ถœํ•˜์—ฌ ๋ฐ˜ํ™˜.
54
  """
55
+ return get_stock_price(ticker=string)