Question Answering with YouTube Videos Using RAG in LangChain Programming Computer Science by usmanmalik57 In previous articles, I explained how to use natural language to interact with [PDF documents](https://www.daniweb.com/programming/computer-science/tutorials/541732/paris-olympics-ticket-information-chatbot-with-memory-using-langchain) and [SQL databases](https://www.daniweb.com/programming/computer-science/tutorials/541771/using-natural-language-… Retrieval Augmented Generation with Hugging Face Models in LangChain Programming Computer Science by usmanmalik57 In my [previous articles](https://www.daniweb.com/programming/computer-science/tutorials/541732/paris-olympics-ticket-information-chatbot-with-memory-using-langchain), I explained how to develop customized chatbots using Retrieval Augmented Generation (RAG) approach in [LangChain](https://www.langchain.com/). However, I used proprietary models such… Retrieval Augmented Generation (RAG) with Google Gemma From HuggingFace Programming Computer Science by usmanmalik57 In a previous article, I explained [how to fine-tune Google's Gemma model for text classification](https://www.daniweb.com/programming/computer-science/tutorials/541544/fine-tuning-google-gemma-model-for-text-classification-in-python). In this article, I will explain how you can improve performance of a pretrained large language model (LLM) using … Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain Programming Computer Science by usmanmalik57 I was searching for Paris Olympics ticket prices for tennis games recently. The official website directs you to a [PDF document](https://tickets.paris2024.org/obj/media/FR-Paris2024/ticket-prices.pdf) containing ticket prices and venues for all the games. However, I found the PDF document to be very hard to navigate. To make things easier, I … Paris Olympics Ticket Information Chatbot with Memory Using LangChain Programming Computer Science by usmanmalik57 In my previous article, I explained how I developed a simple chatbot using LangChain and Chat-GPT that can answer queries related to Paris Olympics ticket prices. However, one major drawback with that chatbot is that it can only generate a single response based on user queries. It can not answer follow-up questions. In short, the chatbot has no … Re: Trying to animate sprite using DirectX9 Programming Software Development by Pavel_11 Hello, it is unneccessarily to use right movex or leftmovex , because it is to much variables. You should to use one variable movex to make it with minus or plus sign in your update function; by pressing left or right keys; because the one thing which is changable is a picture; I mean in global sense; variables like leftx, right x should be one… Vector Output Problem Programming Software Development by OmniX vector<string> div; div.pushback("a"); div.pushback("b"); div.pushback("c"); for(int i= 0; i < div.size(); i++) { cout << "Letters: " << div[i] << endl; } cin.get(); Output: Letters: a Letters: a, b Letters: a, b, c I … vector container for two class objects Programming Software Development by prahesh class Data { string name; string ID; public: Data(){cout<<"Data"<<endl;} }; class info{ string name; string ID; public: info(){cout<<"info"<<endl;} }; Two classes defined above. Now I want to create a vector of type std::vector<Data obj1, info… Re: vector container for two class objects Programming Software Development by AssertNull Not sure what you are trying to do, but I feel confident it isn't this: std::vector<Data obj1, info obj2> container; Perhaps you want to make a third class made up of the other two classes? class ThirdClass { Data obj1; info obj2; }; vector <ThirdClass> container; You may need to expand on what … Re: Vector Out of Range Programming Software Development by Ancient Dragon >> vector<int> vectorOne(29); The array on line 10 and the vector only have 29 items, not 30. If you want 30 then say so. Count them on your fingers if you need to verify, 0, 1, 2, 3, ... 29, 30. Re: vector of vectors Programming Software Development by mrnutty vector<vector<char>> vset; //that should be an error because of the confusion of the stream operator >>. Need space between them. Re: vector help Programming Software Development by jeezcak3++ <~~ another noob. #include <vector> save this in your include file folder as std_lib_facilities.h. don't forget to include in your code? [CODE]/* simple "Programming: Principles and Practice using C++" course header to be used for the first few weeks. It provides the most common standard headers (in the global … Re: Vector help please Programming Software Development by Nick Evan [QUOTE=gangsta gama;928605]Thank you niek_e but i have been away from programming for a while and i believe after this is all said and done you will get sick of me asking questions :).[/quote] You'll be amazed with my patience :) [QUOTE=gangsta gama;928605] First question: What is [icode]void ShowInv(vector<string> inv)[/icode] mean? i… Vector Programming Software Development by aluhnev #include "stdafx.h" #include<vector> #include<iostream> using namespace std; int main( int argc, char ** argv ) { // from initializer list (C++11) cout << "vector from initializer list (C++11): " << endl; vector<int> vi1 = { 1, 2, 3, 4, 5, 6, 7, 8, … Re: Vector help please Programming Software Development by VernonDozier First, if you don't already have one, you need to get an online C++ guide that lists all libraries and all functions within those libraries. There are all sorts of vector tutorials out there as well, and always check Daniweb too. I personally like this site: [url]http://www.cplusplus.com[/url] It has a section on vectors: [url]http://www… vector Programming Software Development by awesome3000 [CODE]//This a partially completed prototype of project 2 //currently use file FlatData1.dat as its initial roster #include <iostream> #include <fstream> #include <vector> #include <string> #include <stdlib.h> #include <cstring> #include <algorithm> using namespace std; typedef enum { thisWeek, … Vector Help Programming Software Development by shadwickman Hi, I was wondering what was wrong with the following code. It creates a [i]vector <int>[/i] and assigns it the values 0 - 51. Then it shuffles these values and prints it to the screen. When I compile it, I get no errors, but when it runs, it throws an error on Windows and it quits the console window and tells me that it has encountered an … Re: Vector help please Programming Software Development by Nick Evan You're still using array, when you should be using vectors. Here's how I'd do it: [code=cplusplus] void ShowInv(vector<string> inv){ cout << "Your inventory:\n"; for (unsigned int i = 0; i < inv.size(); i++) cout << inv.at(i) << endl; } int main() { vector<string> inventory; … Re: Vector help please Programming Software Development by Nick Evan [QUOTE=gangsta gama;928698]i still dont know what [icode]cout << inv.at(i) << endl;[/icode] means :). I get the variable: inv. I just dont get the at(i) part. [/quote] It's means the i-th object in the vector. In other words: If you say [icode]inv.at(i)[/icode] you get the left most book on the shelf. [icode]inv.at(1)[/icode] will get … Re: vector Programming Software Development by awesome3000 the program does not run and i got the following errrors: 55 `void HOMEPAGE::selectManagrTask(std::vector<std::string, std::allocator<std::string> >&)' member function declared in class `HOMEPAGE' 55 In member function `void HOMEPAGE::selectManagrTask(std::vector<std::string, std::allocator<std::string> >&)' … Re: Vector Help Programming Software Development by shadwickman I don't understand that part you added to your post... I eliminated the possibility of rand() duplicating cards in the deck by erasing each index rand() selected from the deck. The range for rand() each time is changed because it gets the new size of the deck (after the previous rindex was erased). At the end, the deck vector is assigned the value … Re: Vector help please Programming Software Development by VernonDozier [QUOTE=gangsta gama;927720]Hello all, I have been programing for a year or two and i dont get vectors. I have seen them with numbers but can someone give me an example of vector.erase with letters? like for an RPG: like sword, axe, armor. Then have them chose what they want to be deleted. Thank you very much, Gangsta gama[/QUOTE] … Re: Vector Help Programming Software Development by Ancient Dragon lines 13 and 14: the size of the vectors is 0 because you have not assigned any elements to the vectors. Therefore the loop starting on line 17 will never execute because both s and decksize are 0. similar lines 31 and 32 cause program to crash because deck does not have a size. How to fix: before line 31 assign a size: [icode]deck.… Re: Vector Help Programming Software Development by shadwickman Oh! Wow that was a stupid mistake. I didn't realize I had been trying to use [icode]deck[ i ] = i;[/icode] on the vector without a length specified. Another option would be to replace line 32 with [icode]deck.push_back( i );[/icode], right? (I'm new to how vectors work in C++, obviously :P) Re: Vector Help Programming Software Development by Lerner Works for me too. I keep getting the same shuffle of the deck because I didn't seed the random number generator before calling rand(), but I have had no problems with erasure of element from vector using either VC6++ or VC8Express. Re: Vector help please Programming Software Development by VernonDozier [QUOTE=gangsta gama;928467]Thank you for explaining the ASCII for me. I tryed to make a program. I get it better now thank you, just i still dont fully get it. I have made a program from your advice combined with a book I bought. It goes like this: [code=c++]// Sample vector erase #include<iostream> #include<vector> #include<… Re: Vector help please Programming Software Development by gangsta gama Thank you both VERY much for replying to me. As i see you two are having a race to see who can post first. Please keep doing that, i need all the explanation i can get :). Okay, i now get mostly all of the small code that Niek_e posted except one thing, i still dont know what [icode]cout << inv.at(i) << endl;[/icode] means :). I get the… vector help! Programming Software Development by newcmp Hey, i've just joined...having trouble with a vector question.. the question asks that if a you a range of numbers, eg.6, we want to erase every third number: eg. 123456 12456 1245 125 15 1 and out we get should be as in this case 1. so far what i have is: [CODE]#include <iostream> #include <cstdlib> #include <cmath> #include <… Re: Vector help please Programming Software Development by gangsta gama Thank you for explaining the ASCII for me. I tryed to make a program. I get it better now thank you, just i still dont fully get it. I have made a program from your advice combined with a book I bought. It goes like this: [code=c++]// Sample vector erase #include<iostream> #include<vector> #include<string> using namespace… Re: Vector help please Programming Software Development by gangsta gama Thank you niek_e but i have been away from programming for a while and i believe after this is all said and done you will get sick of me asking questions :). Lets start with the simple small code: First question: What is [icode]void ShowInv(vector<string> inv)[/icode] mean? i know void ShowInv declares and names the function but what …