묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결모두를 위한 대규모 언어 모델 LLM(Large Language Model) Part 2 - 랭체인(LangChain)으로 나만의 ChatGPT 만들기
selfqueryRetriever에서 contain,like 필터링 오류문제
안녕하세요 답해주셔서 감사합니다. Your goal is to structure the user's query to match the request schema provided below. << Structured Request Schema >> When responding use a markdown code snippet with a JSON object formatted in the following schema: ```json { "query": string \ text string to compare to document contents "filter": string \ logical condition statement for filtering documents } ``` The query string should contain only text that is expected to match the contents of documents. Any conditions in the filter should not be mentioned in the query as well. A logical condition statement is composed of one or more comparison and logical operation statements. A comparison statement takes the form: comp(attr, val): - comp (eq | ne | gt | gte | lt | lte | contain | like | in | nin): comparator - attr (string): name of attribute to apply the comparison to - val (string): is the comparison value A logical operation statement takes the form op(statement1, statement2, ...): - op (and | or | not): logical operator - statement1, statement2, ... (comparison statements or logical operation statements): one or more statements to apply the operation to Make sure that you only use the comparators and logical operators listed above and no others. Make sure that filters only refer to attributes that exist in the data source. Make sure that filters only use the attributed names with its function names if there are functions applied on them. Make sure that filters only use format YYYY-MM-DD when handling date data typed values. Make sure that filters take into account the descriptions of attributes and only make comparisons that are feasible given the type of data being stored. Make sure that filters are only used as needed. If there are no filters that should be applied return "NO_FILTER" for the filter value. 이런 스키마를 가지고있잖아요. 근데 contain이랑 like가 인식이 안되는 오류가 있습니다. 그래서 에러가 떠버럽니다. 그거에 대해 해결방법이 있을까요 --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-54-5a63d86f57f7> in <cell line: 1>() ----> 1 results = retriever.get_relevant_documents( 2 "롤과 배그가 돌아가는 컴퓨터 견적을 추천해줘" 3 ) 4 5 for res in results: 12 frames /usr/local/lib/python3.10/dist-packages/langchain_core/structured_query.py in _validate_func(self, func) 24 if isinstance(func, Comparator) and self.allowed_comparators is not None: 25 if func not in self.allowed_comparators: ---> 26 raise ValueError( 27 f"Received disallowed comparator {func}. Allowed " 28 f"comparators are {self.allowed_comparators}" ValueError: Received disallowed comparator like. Allowed comparators are [<Comparator.EQ: 'eq'>, <Comparator.NE: 'ne'>, <Comparator.GT: 'gt'>, <Comparator.GTE: 'gte'>, <Comparator.LT: 'lt'>, <Comparator.LTE: 'lte'>]이런오류가뜹니다.
-
미해결ESXi 가상 인프라 구축과 보안 솔루션을 활용한 이상징후 탐지 모니터링
sguil 시간대 변경하는 방법이 혹시 있을까요?
오른쪽 위에 sguil 시간대는 변경이 혹시 불가능한가요? 구글링 해봐도 설정법이 안나오는 것 같아서요..
-
해결됨10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
2-T 17298번-오큰수 질문
안녕하세요 큰돌 선생님. 수업을 열심히 듣고 있는 학생입니다.정답이 틀려서 질문했다기보단 강의를 보기 전에 스스로 풀었는데 저는 우선순위 큐를 사용해서 풀었습니다. 맞추고 나서 기분이 좋은 상태로 선생님 강의를 봤는데 스택으로 푸셨더라고요.이런 방법도 있구나~ 하면서 어떻게 푸셨는지 로직을 보는데 이게 왜 되는지 오랜 시간 생각을 해봐도 논리? (스택 방식으로 푸는게 왜 유효하고 문제가 없는건지)를 모르겠습니다. ㅜㅜ우선순위큐로 푸는 상황에서는 현재 가르키고 있는 인덱스의 값보다 작은 값의 모든 우선순위큐 안에 있는 인덱스들을 pop을 한다고 확신을 하겠는데 스택은 확신이 안 듭니다예를 들면 스택안에 현재 인덱스가 가르키는 값보다 작은 값의 인덱스들은 저장을 하며 pop을 하다가 더 큰 값 인덱스를 만나서 while문을 멈췄는데 그 밑에 그러니까 더 일찍 들어온 애들 중에 pop을 해야 하는 애가 있는 상황이 있을까봐 저는 스택이 아닌 우선순위 큐부터 써본 것 같습니다. 이렇게 딱 스택을 써도 문제가 없겠다. 즉 위 같은 상황이 안 생기겠다! 라는 생각이 드는 논리를 알고 싶습니다. 그리고 이렇게 논리를 생각해야하는 문제들을 어떻게 대비해야하는지 여쭤보고싶습니다. 제가 머리가 나쁜지 한 10분 생각을 해봐도 스택이 왜 문제가 없는지 아직도 깨닫지 못했습니다 ㅠㅠ이런 논리를 생각해내지 못해서 손도 못댄 문제들이 있습니다. 풀어보셨는지는 모르겠지만 프로그래머스에 요격 시스템이라는 문제는 비슷한 이유로 제대로 풀지 못해서 결국 남의 코드를 봤습니다. 밑에는 우선순위 큐로 푼 코드입니다http://boj.kr/88988bf1465247cea240603121ec5ae7
-
해결됨김영한의 실전 자바 - 중급 2편
7. 컬렉션 프레임워크 - HashSet 오타
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]7. 컬렉션 프레임워크 - HashSet 마지막 페이지의 MyHashSetV3Main 클래스에서 MySetV3<String>이 아닌 MySet<String> 인 것 같습니다. 수정 해주시면 감사하겠습니다.
-
해결됨파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트 (장고 4.2 기준)
외래키 참조 관계에서 bulk_create는 어떻게 사용하나요?
from django.db import models class Post(models.Model): title = models.CharField(max_length=200) content = models.TextField() class Comment(models.Model): post = models.ForeignKey(Post, on_delete=models.CASCADE) content = models.TextField() import itertools from typing import Iterator, Tuple from django.core.management import BaseCommand from django.db import transaction from blog.models import Post, Comment class Command(BaseCommand): help = "test" def handle(self, *args, **options): generate_post_instances = ( Post(title=title, content=content) for title, content in self.generate_post_row() ) with transaction.atomic(): for chunks in self.get_chunks(generate_post_instances, chunk_size=1000): Post.objects.bulk_create(chunks, ignore_conflicts=True) for post_instance in Post.objects.all(): generate_comment_instance = ( Comment(post=post_instance, content=content) for content in self.generate_comment_row() ) for chunks in self.get_chunks( generate_comment_instance, chunk_size=1000 ): Comment.objects.bulk_create(chunks, ignore_conflicts=True) @classmethod def generate_post_row(cls, size: int = 1000) -> Iterator[Tuple[str, str]]: for i in range(1, size + 1): yield f"Test post {i}", f"Test content {i}" @classmethod def generate_comment_row(cls, size: int = 100) -> Iterator[str]: for i in range(1, size + 1): yield f"Test comment {i}" @classmethod def get_chunks(cls, iterable: Iterator, chunk_size: int = 100) -> Iterator: iterator = iterable if hasattr(iterable, "__next__") else iter(iterable) for first in iterator: yield itertools.chain([first], itertools.islice(iterator, chunk_size - 1)) 안녕하세요.기존 강의에서 다루시던 대용량 데이터 처리 관련 코드를 참조하여 좀 더 이해하고자 커스텀해서 예시코드를 작성하게 되었습니다.제너레이터, bulk_create 메서드에 대해서 질문이 있습니다.1. 제너레이터는 yield 한 다음 반복문을 이용해 호출합니다. 제너레이트를 호출 한다면 호출할 때 반복문이 여러개 겹치게 되는데 이때 시간복잡도는 어떻게 되는건가요?[generate_post_row 호출 > generate_post_instances 호출 > get_chunks > 호출] 이때 반복문을 많이 사용하게 되는데 어떤식으로 처리가 되는지 궁금합니다. 2. transaction.atomic() 에서 먼저 Post을 bulk_create로 생성한 뒤 해당 Post의 데이터들을 Comment 인스턴스에 넘겨주어 bulk_create를 사용하였는데. 혹시 더 나은 방법이 있을까요?
-
해결됨
left join 할 때
a 와 b 테이블이 있다고 가정하고 (b 테이블에 매칭되는 값이 없어도) 빠지면 안되는 정보가 있어서강의에서 말씀하신대로 left outer join의 기준이되는 집합 테이블을 a 로 from 절에 배치했는데요 select * from a left join a on a.id = b.id 이렇게 걸면 원하는 조건 (매칭되는 값이 없어도)이 정상적으로 나오는데요 저렇게 b테이블을 그대로 안걸고뭔가 조건을 추가해서 left join 을 걸면 매칭되는 값은 전혀 안나오고 공통된 값만 나옵니다. 예시로 with b ( select * from bleft join a on a.id = b.id where a.deleted = 0and a.customerid = 1)select * from a left join a on a.id = b.idwhere a.customerid = 1 이런식으로 b테이블을 그대로 조인하는게 아니라 뭔가 조건을 준 다음에 조인하면 매칭되는 값만 나오고 값이 없는 데이터도 나와야되는데 안나와서요 from 절에 a 테이블을 기준으로해서 잡았는데도 왜 공통된 값만 나오는걸까요? 두 구문에서 어떤 차이때문에 다른 결과를 도출하는지 궁금합니다
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
CSR 동작과정
제가 이해한 개념은CSR 방식이면 클라이언트 브라우저가 서버에 요청을 처음 보낼 때 웹 서버(Apache, nginx 등)에서 정적 리소스(HTML, CSS, JS)를 응답해주고 거기서부터 동적으로 필요한 데이터가 있으면 WAS에 API 요청을 통해 데이터를 가져와서 필요한 부분만 렌더링 한다고 알고 있는데 맞을까요??
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
gradlew.bat build 오류
cmd 에 dir 하면 gradlew.bat이 있는데 빌드가 안됩니다.환경변수설정도 하고 JDK도 다시 깔았는데 안됩니다.
-
미해결프로그래밍 시작하기 : 웹 입문 (Inflearn Original)
회원가입 폼 검증하기 실행이 안됩니다.
alert 메세지가 숨겨지는 코드까지는 실행이 되는데그 이후 코드들이 실행되지 않는 것 같습니다. 콘솔에도 값들이 뜨지 않고 제출하면 새로고침 되는 현상이 발생해서혹시 보지 못한 오타가 있나 검수 해보고 강의 코드와 비교도 해봤는데실행되지 않는 이유를 잘 모르겠어서 질문 남겨봅니다..!
-
미해결[입문자를 위한 UE5] Part4. 언리얼 엔진 C++
안녕하세요! rider로 작성 후 R1Actor를 월드에 놓고 실행 시켜도 Obj안에 데이터가 안보입니다.
uproperty까지 rider로 작성 후 R1Actor를 월드에 놓고 실행 시켜도 Obj안에 데이터가 안보입니다. 중단점 사용해서 마우스 데도 안에 있는 데이터가 안보입니다. 생성자에서 초기화 되지 않았다고만 뜨는데...해결방법이 있을까요ㅠㅠ
-
미해결[코드팩토리] [초급] 8시간만에 끝내는 코드팩토리의 Typescript 완전정복 풀코스
instantiator 질문
function instantiator<T extends { new (...args: any[]): {} }>(constructor: T, ...args: any) { return new constructor(...args); } console.log(instantiator(Idol, '아이유', 23)); console.log(instantiator(Car, 'BMW', 'M3')); 여기에서 instantiator의 parameter에서의 constructor parameter 변수는, 사실상 생성자의 의미보다는 class 정의 자체(T의 형식을 가진) 를 넘겨준다고 봐도 되는건가요?
-
해결됨SpriteKit과 GameplayKit으로 만드는 인공지능 술래잡기 게임
강의마다 올려주신 에셋들에 접근이 안돼요..
자료 다시 한 번 첨부 부탁드려요~!
-
미해결국가공인 산업보안관리사(ISE) 자격증 대비
강의자료를 받을 수 있을까요?
하나하나 별도로 다운받기가 너무 힘듭니다.저도 자료를 받아볼 수 있을까요?eloreby@gmail.com으로 부탁드립니다.
-
해결됨스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
오류 페이지2 - application.properties 문제
환경Window10, intellij ultimate, Java17, spring boot 3.2.5application.properties- /error-ex상황스프링 부트의 application.properites 기본값으로 /error-ex에 GET 요청을 보냈을 때 위와 같은 결과를 얻을 수 있었습니다.위의 이미지에서 오류 페이지2의 1:37에서의 결과가 다른 것을 확인할 수 있었습니다. 명시적으로 아래와 같이 값을 지정해야 동일한 결과를 얻는데 왜 그런 것인지 알 수 없어 문의를 드립니다.server.error.include-exception=false server.error.include-message=never server.error.include-stacktrace=never server.error.include-binding-errors=never
-
미해결코드로 배우는 React 19 with 스프링부트 API서버
섹션 8 .. API서버에서 사용자 정보 추출하기(2) 질문입니다.
accessToken을 넘기는데 undefined가 떠서 컨트롤러에 오지 못하는 거 같습니다. socialcontroller 입니다. 리액트 kakaoAPI.js 입니다. accessToken을 쿼리스트링으로 잘 보내고받는 코드는 맞는거 같은데 왜 undefined가 뜨는지 모르겠습니다...
-
해결됨10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
당근마켓 엔지니어 문제 BFS 코드 질문
안녕하십니까 큰돌님제가 강의 보기 전에 당근마켓 엔지니어 문제를 혼자 코드로 작성했었는데뭐가 문제인지 모르겠습니다입력에서 무한루프에 빠지는 왜 빠지는 거 같은데 모르겠습니다 ...http://boj.kr/d57fe9c1c85b4938bc642528ab607f2e그리고 n이 세로, m이 가로이면 반복문에서 n과 m의 위치가 제 코드처럼 바껴야 하는 거 아닌가요 ??
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
git 토큰 입력 내용이 안뜨는 경우
저는 git 토큰 입력 하라는 내용이 안뜨는데 그냥 진행해도 상관없나요??
-
미해결
카카오 소셜로그인 후 /login?error로 넘어갑니다.
Spring Security와 카카오 소셜로그인을 함께 사용했습니다.문제는 카카오 소셜로그인 후 https://도메인이름/login?error로 넘어갑니다.로그를 봐도 SecurityConfig의 Filter Chain를 잘 거치고 redirect uri 설정도 문제 없습니다.로컬 환경에서는 잘 되는데 배포 환경에서 테스트만 하면 안되는데 /login?error 부분이 Spring Security 문제인 것 같아 /**로 다 열어주었는데도 그러네요.MSA 환경이라 gateway와 eureka를 사용했는데 로컬 환경에서는 잘 되고 배포 환경에서 잘 안된다면 gateway나 eureka 설정 문제일까요?제가 놓치는 부분이 무엇일지 궁금합니다 ㅜㅜ
-
미해결쿠버네티스 어나더 클래스-Sprint 1, 2 (#실무기초 #설치 #배포 #Jenkins #Helm #ArgoCD)
Jenkin 소스코드관리 입력시 오류
저기 오류가 발생하여 무시하고 진행했을때 Running as SYSTEM Building in workspace /var/lib/jenkins/workspace/2121-source-build The recommended git tool is: NONE No credentials specified Cloning the remote Git repository Cloning repository https://github.com/k8s-1pro/kubernetes-anotherclass-api-tester.git > git init /var/lib/jenkins/workspace/2121-source-build # timeout=10 ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could not init /var/lib/jenkins/workspace/2121-source-build at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1073) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:819) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305) at hudson.scm.SCM.checkout(SCM.java:540) at hudson.model.AbstractProject.checkout(AbstractProject.java:1245) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:649) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:521) at hudson.model.Run.execute(Run.java:1900) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Caused by: hudson.plugins.git.GitException: Error performing git command: git init /var/lib/jenkins/workspace/2121-source-build at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2858) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2762) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2757) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1071) ... 12 more Caused by: java.io.IOException: Cannot run program "git" (in directory "/var/lib/jenkins/workspace/2121-source-build"): error=2, No such file or directory at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071) at hudson.Proc$LocalProc.<init>(Proc.java:252) at hudson.Proc$LocalProc.<init>(Proc.java:221) at hudson.Launcher$LocalLauncher.launch(Launcher.java:994) at hudson.Launcher$ProcStarter.start(Launcher.java:506) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2835) ... 16 more Caused by: java.io.IOException: error=2, No such file or directory at java.base/java.lang.ProcessImpl.forkAndExec(Native Method) at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340) at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107) ... 22 more ERROR: Error cloning remote repo 'origin' Finished: FAILURE 로그에서 이러한 오류를 발견했습니다. 사진과 같은 깃저장소의 오류때메 발생하는 거같습니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
npm run dev 오류
npm run dev 하면 > react-boiler-plate@1.0.0 dev> concurrently "npm run backend" "npm run start --prefix client"sh: concurrently: command not found다음과 같은 오류가 발생합니다. npm install server과, client 모두에서 진행했고gpt가 알려주는 npm install -g concurrently도 진행했고npm update 후 다시 실행해보아도 해결되지 않고 있습니다. 도와주세요 ..!