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
31
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
•
The error message "RuntimeError: Directory 'static/' does not exist" typically...
Andrew Fletcher
•
It seems like you're using the CharacterTextSplitter class from the tiktoken...
Andrew Fletcher
•
OpenAI request timeout?
Retrying...
Andrew Fletcher
•
Loading the code in a platform - in this article, I'll be focusing on Android...
Andrew Fletcher
•
While the default version on Ubuntu 20.04 for Python is 3.8, I've added Python 3.11.5 (latest version).
Errors
GPTSimpleVectorIndex is deprecated
Attempting to run python3.11 model-ai.py and I'm seeing the following response
/home/{user}/.local/lib/python3.11/site-packages/langchain/__init__.py:40: UserWarning: Importing BasePromptTemplate from langchain root module is no longer supported.
warnings.warn(
/home/{user}/.local/lib/python3.11/site-packages/langchain/__init__.py:40: UserWarning:...
Andrew Fletcher
•
Set up your server
Begin by cleaning up your server environment. Do...
Andrew Fletcher
•
It appears that the plugin or file path is not working how it used to be on...
Andrew Fletcher
•
Using the Drupal Poll module and passing via RESTful API - How do...
Andrew Fletcher
•
For an introduction into setting up RESTful hal+json refer to the set-up...
Andrew Fletcher
•
How to use the Drupal REST API to trigger I've forgot (need to change) my password.
POST: {domain}/user/password?_format=hal_json
Content-type: application/hal_json
Accept: application/hal+jsonOr if you are using hal_json then use
POST: {domain}/user/password?_format=json
Content-type: application/json
Accept: application/jsonBody
{
"mail": "your@yoursite.email"
}All going well there will be no response.
Other responses
However, if you have sent an email that doesn't exist on the...
Andrew Fletcher
•
To get the X-CSRF token, first, you need to login as a member. Follow the...
Andrew Fletcher
•
In retrieving an image, the primary element required is:
File id or...
Andrew Fletcher
•
For an introduction into setting up RESTful hal+json refer to the set-up...
Andrew Fletcher
•
For an introduction into setting up RESTful hal+json refer to the set-up...