| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 |
- #선진국 대한민국 #선진국 #대한민국 #아이들 #청소년 #고민 #해결 #심리
- LLM(large language model)
- #다산 정약용 #유배지에서 보낸 편지 #도덕 #용기 #염 #주역 #호연지기 #효제 #근검
- AGENT.PY
- 함수 annotation
- JSON
- AI framework
- ppt) 파일 #오피스(워드
- TOOLS.PY
- 파이썬
- call model (history)
- 오블완
- 에이전트
- # 암호(비밀번호) 분실 # 암호(비밀번호) 찾기 #오피스(doc
- Fake Model-script 사용한 AI AGENT 프로그램
- 엑셀
- xls
- AI
- Tool Registry
- list comprehension
- LLM.PY
- tool schema
- 티스토리챌린지
- 함수 signature
- 파워포인트) #집(zip)파일 #아래한글(HWP) #brute-force(무차별 대입)
- python함수 자동분석
- 인공지능
- LLM
- AI Agent
- 함수 docstring
- Today
- Total
목록전체 글 (173)
아톨러브
#-------- 1. Tools from pathlib import Path def calculator(expr:str)->str: """(20*4)+15와 같은 간단한 산술 표현식을 계산합니다.""" allowed = set("0123456789+-*/().") expr = expr.replace(" ", "") if not expr or not set(expr) allowed: return "오류: 숫자와 +-*/().만 허용됩니다." try: return str(eval(expr)) except (SyntaxError, ZeroDivisionError) as e: ..
#-------- 1. Tools from pathlib import Path def calculator(expr:str)->str: """(20*4)+15와 같은 간단한 산술 표현식을 계산합니다.""" allowed = set("0123456789+-*/().") expr = expr.replace(" ", "") if not expr or not set(expr) allowed: return "오류: 숫자와 +-*/().만 허용됩니다." try: return str(eval(expr)) except (SyntaxError, ZeroDivisionError) as e: ..
#-------- 1. 설계 주석 # 설계 # 목표: 사용자로부터 입력받은 문장 # 도구: 계산기, 파일 읽기, 조회 # 반복: 최대 6단계 # 메모리: 메시지 목록 (완료 시 디스크에 저장) # 종료: 모델이 '완료' 도구를 반환하거나 단계 제한에 도달함 # (아래는 영문으로 위와 동일한 내용) # The design # goal a sentence from the user # tools calculator, read_file, lookup # loop at most 6 steps # memory a list of messages, save..
#-------- 1. Type Hint 그리고 __annotations__ def search(query:str, limit:int=3, safe:bool=True)->str: mode = "safe" if safe else "open" return f"'{query}'에 대해 {limit}개의 결과물({mode})" print(search("환불 정책")) print(search("개점 시간", limit=1, safe=False)) print(search.__annotations__) #-------- 2. History 분석 def summarise(messages:list[dict], limit:int|None=None)->di..
#-------- 1. HTTP 상태 코드 # 200 OK, it worked # 400 bad request, your JSON or parameters are wrong # 401 unauthorised, the API key is missing or invalid # 403 forbidden, the key is valid but not allowed to do this # 404 not found, check the URL # 429 too many requests, slow down and retry later # 500 server error on their side # 503 service unavailable, retry later #-..
#-------- 1. tools.py 파일와 main.py 파일: main.py에서 tools 사용하기 # 파일1: tools.py def calculator(expr): return eval(expr) def word_count(text): return len(text.split()) REGISTRY = {"calculator":calculator, "word_count":word_count} # 파일2: main.py import tools from tools import REGISTRY, word_count print(tools.calculator("8*5")) print(word_count("에이전트는 루프입니다..
