Skip to content

Instantly share code, notes, and snippets.

View paolorechia's full-sized avatar

Paolo Rechia paolorechia

View GitHub Profile
@paolorechia
paolorechia / json
Created August 4, 2020 19:28
Swagger SAM
{
"Description": "book-store-app\nBook Store Serverless App\n",
"Parameters": {
"DynamoDBTableName": {
"Default": "DevTable",
"Type": "String"
},
"CognitoUserPoolApiClientName": {
"Default": "DevApiPoolClient",
"Type": "String"
@paolorechia
paolorechia / json
Created August 4, 2020 19:28
Swagger SAM
{
"Description": "book-store-app\nBook Store Serverless App\n",
"Parameters": {
"DynamoDBTableName": {
"Default": "DevTable",
"Type": "String"
},
"CognitoUserPoolApiClientName": {
"Default": "DevApiPoolClient",
"Type": "String"
@paolorechia
paolorechia / example_run.txt
Last active February 27, 2024 01:40
Vicuna Prompt Fetch Chuck Norris Joke
> Entering new AgentExecutor chain...
I should use the requests library to fetch the website's HTML
Action: Python REPL
Action Input:
response = requests.get('https://api.chucknorris.io/')
Observation: name 'requests' is not defined
Thought:I should import the requests library
Action: Python REPL
Action Input:
@paolorechia
paolorechia / New prompt output
Last active April 20, 2023 19:45
Test search prompt
(base) paolo@paolo-MS-7D08:~/learn-langchain$ python cat_joke.py
> Entering new AgentExecutor chain...
I should use the Python REPL to create a CSV file and write the jokes to it.
Action: Python REPL
Action Input:
import csv # line 1
with open("catjokes.csv", "w", newline='') as csvfile: # line 2
writer = csv.writer(csvfile) # line 3
@paolorechia
paolorechia / Create joke
Created April 20, 2023 21:50
Fine tuned example
(base) paolo@paolo-MS-7D08:~/learn-langchain$ python cat_joke.py
> Entering new AgentExecutor chain...
I should use the Python REPL to create a CSV file.
Action: Python REPL
Action Input:
import csv # line 1
with open("catjokes.csv", "w", newline='') as csvfile: # line 2
writer = csv.writer(csvfile) # line 3
Type your search: What is Germany?
(Document(page_content="Germany has been described as a [[great power]] with [[Economy of Germany|a strong economy]]; it has the [[List of sovereign states in Europe by GDP (nominal)|largest economy in Europe]], the world's [[List of countries by GDP (nominal)|fourth-largest economy by nominal GDP]] and the [[List of countries by GDP (PPP)|fifth-largest by PPP]]. As a global power in industrial, [[Science and technology in Germany|scientific and technological]] sectors, it is both the world's [[List of countries by exports|third-largest exporter]] and [[List of countries by imports|importer]]. As a [[developed country]] it [[Social security in Germany|offers social security]], [[Healthcare in Germany|a universal health care system]] and [[Higher education in Germany|a tuition-free university education]]. Germany is a member of the [[United Nations]], the European Union, [[NATO]], the [[Council of Europe]], the [[G7]], the [[G20]] and the [[OECD]]. It has the [[List of World
@paolorechia
paolorechia / germany_bot_langchain
Created April 25, 2023 20:46
Germany Answering Bot
Type your question: Where is Germany?
> Entering new AgentExecutor chain...
I should always think about what to do
Action: Search
Action Input: Germany
Observation: [(Document(page_content="'''Germany''',{{efn|{{lang-de|Deutschland}}, {{IPA-de|ˈdɔʏtʃlant|pron|De-Deutschland.ogg}}}} officially the '''Federal Republic of Germany''',{{efn|{{Lang-de|Bundesrepublik Deutschland}}, {{IPA-de|ˈbʊndəsʁepuˌbliːk ˈdɔʏtʃlant|pron|De-Bundesrepublik Deutschland.ogg}}<ref>{{cite book|title=Duden, Aussprachewörterbuch|publisher=Dudenverlag|year=2005|isbn=978-3-411-04066-7|editor-last=Mangold|editor-first=Max|edition=6th|pages=271, 53f|language=de}}</ref>}} is a country in [[Central Europe]]. It is the [[List of European countries by population|second-most populous country]] in Europe after [[Russia]], and the most populous [[member state of the European Union]]. Germany is situated between the [[Baltic Sea|Baltic]] and [[North Sea|North]] seas to the north, and the [[Alps]] to the south. Its 16 [[States of Germany|constitue
@paolorechia
paolorechia / output.txt
Last active May 4, 2023 21:05
WizardLM AutoGPT fail example
(learn-langchain) paolo@paolo-MS-7D08:~/learn-langchain$ python3 -m langchain_app.auto_gpt.auto_gpt_example
/home/paolo/learn-langchain/langchain_app/utils/deprecation_warning.py:4: UserWarning: 'langchain_app.models.vicuna_request_llm' is a deprecated module, should not be used and will be removed in future versions.
warnings.warn(f"'{name}' is a deprecated module, should not be used and will be removed in future versions.")
load INSTRUCTOR_Transformer
max_seq_length 512
> Entering new LLMChain chain...
Prompt after formatting:
System: You are Tom, Assistant
@paolorechia
paolorechia / Test.txt
Last active June 12, 2023 21:04
Guidance tests
Tests done with Fast Tokenizer = False
--> open-llama-7b-open-instruct
VMware_open-llama-7b-open-instruct - 4 bit
```
Who are you?
Observation: My memory fails me...
Thought: I'm not sure if I'm in a simulation or not.
{'thought': " I'm not sure if I'm in a simulation or not."}
@paolorechia
paolorechia / sample_trace.json
Created January 21, 2024 18:46
Traceloop trace
{
"name": "chroma.add",
"context": {
"trace_id": "0x1283ca3c3503d68ee2e9390fe2603259",
"span_id": "0x94854835615b95b2",
"trace_state": "[]"
},
"kind": "SpanKind.INTERNAL",
"parent_id": null,
"start_time": "2024-01-21T18:44:55.597429Z",