developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
Selected filter
27
results
Andrew Fletcher
•
Overview of the elements
Set Up API Keys
Obtain API keys for Pinecone and OpenAI.
Store the keys securely. Consider using a credentials.py file (as mentioned in a previous response).
Install Required Libraries
Install the necessary Python libraries, such as Pinecone's Python client (pinecone-client) and OpenAI's Python client (openai).
pip install pinecone-client openai
Create a Language Model Chain
Use OpenAI's language model (e.g., GPT-4) to understand and process...
Andrew Fletcher
•
Lando is a local development environment tool, and it might not directly support...
Andrew Fletcher
•
As you're using Bootstrap 5 and applying a style for the hover state of an...
Andrew Fletcher
•
Lando is a development environment tool that makes it easier to set up and...
Andrew Fletcher
•
The error message "RuntimeError: Directory 'static/' does not exist" typically...
Andrew Fletcher
•
It seems like you're using the CharacterTextSplitter class from the tiktoken library to split text into chunks. The CharacterTextSplitter.from_tiktoken_encoder() method is used to create an instance of the CharacterTextSplitter class with specific configuration settings.
Breakdown of the parameters used in this method
separator
This parameter specifies the character or sequence of characters used to separate the text into chunks. In your example, the separator is set to "\n", which means...
Andrew Fletcher
•
Create a Lando setup running Drupal 10.
The command you provided appears to be a...
Andrew Fletcher
•
OpenAI request timeout?
Retrying...
Andrew Fletcher
•
While the default version on Ubuntu 20.04 for Python is 3.8, I've added Python...
Andrew Fletcher
•
Set up your server
Begin by cleaning up your server environment. Do...
Andrew Fletcher
•
Using CK Editor 5, I needed to add instructions to a page that held FontAwesome (FA) icons. Included in these instructions were a couple of FA icons. Initially adding them was going to be resolved using Pseudo-elements. Accordingly they would be applied as follows:
.download-icon, .portal-icon {
position: relative;
display: inline-block;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
}
.download-icon::before,
.portal-icon::before {
font-family:...
Andrew Fletcher
•
Installing PHP on OSX and it installed PHP 8.2.x. However, for my...
Andrew Fletcher
•
Setting up the admin password.
Process:
1. Edit jetty.xml
To begin you...
Andrew Fletcher
•
This is a relatively quick process, beginning with dropping the database...
Andrew Fletcher
•
Import a database
lando db-import doj.sqlEnter the MySQL database
lando mysql...