Share
Sign In
공부 내용
OpenAI API
Y
yeji Kim
👍
Batch API 이용하기
1.
Upload batch file
from openai import OpenAI client = OpenAI() batch_input_file = client.files.create( file=open("batchinput.jsonl", "rb"), purpose="batch" )
2.
Creating the batch
batch_input_file_id = batch_input_file.id client.batches.create( input_file_id=batch_input_file_id, endpoint="/v1/chat/completions", completion_window="24h", metadata={ "description": "nightly eval job" } )
3.
Checking the status of a batch
from openai import OpenAI client = OpenAI() client.batches.retrieve("batch_abc123")
4.
Retrieving the results
from openai import OpenAI client = OpenAI() file_response = client.files.content("file-xyz123") print(file_response.text)
다른 LLM 알아보기
이걸로 기본적인 처리는 해야겠다!!! (와)
Subscribe to '아무튼-작업일지'
Welcome to '아무튼-작업일지'!
By subscribing to my site, you'll be the first to receive notifications and emails about the latest updates, including new posts.
Join SlashPage and subscribe to '아무튼-작업일지'!
Subscribe
👍
Other posts in '공부 내용'See all
yeji Kim
.
모델 용량 - 10억으로 나눈 뒤 데이터 타입 바이트 수 곱하기 e.g. 7B 모델 16비트(2바이트) → 7*2=14GB from llama_index.core import Document, VectorStoreIndex 상호 순위 조합 구현하기 BM25와 의미 벡터 검색 방법 벡터 데이터베이스 벡터 라이브러리 - Faiss, Annoy, NMSLIB, ScaNN 벡터 전용 데이터베이스 - pinecone, weaviate, milvus, chroma, qdrant, vespa 벡터 기능 추가 데이터베이스 - elasticSearch, PostgreSQL, MongoDB, Neo4j MLOps 데이터 준비 → 모델 학습 → (모델 저장소 ↔ 모델 평가) → 모델 배포 → 모니터링 → 재학습 ... 멀티 에이전트 - AutoGen, MetaGPT, CrewAI 사용자 맞춤형 정보
yeji Kim
DB table 구성하기
To efficiently implement the features you described, the database structure needs to account for several types of entities: lecture notes, textbooks, past exam questions, professors, and study tips. Additionally, the system should allow cross-referencing between these entities, version control for lecture notes, and the ability to filter data by professor. Here’s how you can structure the database tables: Key Tables for the Database Structure Subjects (subjects): Stores information about each subject. Professors (professors): Stores information about the professors. Lecture Notes (lecture_notes): Stores metadata for each lecture note document. Lecture Slides (lecture_slides): Stores content for individual slides within a lecture note. Textbooks (textbooks): Stores metadata about textbooks for each subject. Textbook Pages (textbook_pages): Stores the text content of each page in a textbook. Test Questions (test_questions): Stores individual test questions. Slide to Textbook Mapping (slide_textbook_mapping): Relates specific slides to textbook pages or paragraphs. Slide to Test Question Mapping (slide_question_mapping): Relates specific slides to test questions. Test Question to Textbook Mapping (question_textbook_mapping): Relates specific test questions to textbook pages or paragraphs. Study Tips (study_tips): Stores study tips from professors related to each subject. Versions (lecture_note_versions): Manages versioning for the lecture notes. Table Structures and Relationships Subjects Table (subjects) subject_id: INT (Primary Key) subject_name: VARCHAR(255) (e.g., "Biochemistry") description: TEXT (optional description) Professors Table (professors)
yeji Kim
OpenAI Embedding & Semantic search
https://platform.openai.com/docs/api-reference/embeddings