목록컴퓨터공학 (130)
스택큐힙리스트
저는 다음과 같은 코드를 가지고 있습니다. test = have it break.selectiveEscape = Print percent % in sentence and not %s % testprint(selectiveEscape)저는 출력 결과를 받고 싶습니다. Print percent % in sentence and not have it break.실제로 무엇이 일어나는지: selectiveEscape = Use percent % in sentence and not %s % testTypeError: %d format: a number is required, not str답변 1 >>> test = have it break.>>> selectiveEscape = Print percent %% in ..
decorated과 @staticmethod로 꾸며진 방법과 @classmethod로 꾸며진 방법의 차이점은 무엇입니까?답변 1어쩌면 예시 코드가 도움이 될지도 모릅니다: foo , class_foo 및 static_foo 의 호출 서명 차이점에 유의하십시오. class A(object): def foo(self, x): print(fexecuting foo({self}, {x})) @classmethod def class_foo(cls, x): print(fexecuting class_foo({cls}, {x})) @staticmethod def static_foo(x): print(fexecuting static_foo({x}))a = A()아래는 객체 인스턴스가 메서드를 호출하는 일반적인 방법입니다..
나는 내 맞춤 데이터셋에서 OpenAI 모델을 세부 조정해야 합니다. 나는 jsonl 형식으로 데이터셋을 생성했습니다. 나는 윈도우 명령행에서 다음 명령어를 사용합니다: set OPENAI_API_KEY= openai tools fine_tunes.prepare_data -f train_data.jsonl위의 명령어는 성공적으로 실행되었으며 jsonl 파일을 업데이트할 제안을 제공합니다. 그 후에 'curie' 모델을 세밀 조정하기 위해 다음 명령어를 실행합니다. openai api fine_tunes.create 'openai.api_key = ' -t train_data.jsonl -m curie 하지만 나는 다음의 문제가 발생하고 있습니다: ←[91mError:←[0m Incorrect API ke..
저는 AWS S3 버킷에서 검색한 이미지를 Dall E/OpenAI API에 전달하려고 하는데, 에러 응답이 나옵니다. message: Invalid input image - format must be in ['RGBA', 'LA', 'L'], got RGB.,저는 업로드하려는 이미지 파일 유형인 RGB가 알파 채널을 포함한다는 것을 이해합니다. 이는 이미지의 투명한 부분을 의미합니다. NodeJS에서 이미지 유형을 유효성 검사하여 API로 보내기 전에 잘못된 이미지를 잡을 수 있는지 가능한가요?내 S3는 이렇게 .png 파일을 받습니다: const data = await s3Client.send( new GetObjectCommand({ ...bucketParams, // Bucket: Key: `pu..